public class MemoryGraphSource extends Object implements GraphSource
GraphSource.Factory
Constructor and Description |
---|
MemoryGraphSource(String routerId,
Graph graph)
Create an in-memory graph source with no runtime router configuration.
|
MemoryGraphSource(String routerId,
Graph graph,
com.fasterxml.jackson.databind.JsonNode config)
Create an in-memory graph source with the specififed runtime router configuration JSON.
|
Modifier and Type | Method and Description |
---|---|
void |
evict()
Callback when the graph (source) gets evicted from the repository.
|
Router |
getRouter() |
boolean |
reload(boolean force,
boolean preEvict)
Reload the graph from it's source.
|
public MemoryGraphSource(String routerId, Graph graph)
public Router getRouter()
getRouter
in interface GraphSource
public boolean reload(boolean force, boolean preEvict)
GraphSource
reload
in interface GraphSource
force
- True to force a reload, false to check only.preEvict
- True to evict the old version *before* loading the new one. In that case the
implementation have to take care of making the getGraph() call wait while the new
graph is being loaded and not return null.public void evict()
GraphSource
evict
in interface GraphSource
Copyright © 2015. All rights reserved.