public class GuavaVertexCache extends Object implements VertexCache
| Constructor and Description |
|---|
GuavaVertexCache(long maxCacheSize,
int concurrencyLevel,
int initialDirtySize) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(InternalVertex vertex,
long 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(long id)
Checks whether the cache contains a vertex with the given id
|
InternalVertex |
get(long id,
Retriever<Long,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 GuavaVertexCache(long maxCacheSize,
int concurrencyLevel,
int initialDirtySize)
public boolean contains(long id)
VertexCachecontains in interface VertexCacheid - Vertex idpublic InternalVertex get(long id, Retriever<Long,InternalVertex> retriever)
VertexCacheget in interface VertexCachepublic void add(InternalVertex vertex, long id)
VertexCacheadd in interface VertexCachepublic List<InternalVertex> getAllNew()
VertexCachegetAllNew in interface VertexCachepublic void close()
VertexCacheclose in interface VertexCacheCopyright © 2012–2015. All rights reserved.