public class CaffeineVertexCache extends Object implements VertexCache
| Constructor and Description |
|---|
CaffeineVertexCache(long maxCacheSize,
int initialDirtySize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(InternalVertex vertex,
Object id)
Adds the given vertex with the given id to the cache.
|
void |
close()
Closes the cache which allows the cache to release allocated memory.
|
boolean |
contains(Object id)
Checks whether the cache contains a vertex with the given id
|
InternalVertex |
get(Object id,
Retriever<Object,InternalVertex> retriever)
Returns the vertex with the given id or null if it is not in the cache
|
List<InternalVertex> |
getAllNew()
Returns an iterable over all new vertices in the cache
|
public CaffeineVertexCache(long maxCacheSize,
int initialDirtySize)
public boolean contains(Object id)
VertexCachecontains in interface VertexCacheid - Vertex idpublic InternalVertex get(Object id, Retriever<Object,InternalVertex> retriever)
VertexCacheget in interface VertexCachepublic void add(InternalVertex vertex, Object id)
VertexCacheadd in interface VertexCachepublic List<InternalVertex> getAllNew()
VertexCachegetAllNew in interface VertexCachepublic void close()
VertexCacheclose in interface VertexCacheCopyright © 2012–2023. All rights reserved.