public class EmptyVertexCache extends Object implements VertexCache
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
|
static EmptyVertexCache |
getInstance() |
public static EmptyVertexCache getInstance()
public boolean contains(Object id)
VertexCache
contains
in interface VertexCache
id
- Vertex idpublic InternalVertex get(Object id, Retriever<Object,InternalVertex> retriever)
VertexCache
get
in interface VertexCache
public void add(InternalVertex vertex, Object id)
VertexCache
add
in interface VertexCache
public List<InternalVertex> getAllNew()
VertexCache
getAllNew
in interface VertexCache
public void close()
VertexCache
close
in interface VertexCache
Copyright © 2012–2023. All rights reserved.