public class GraphUpdaterManager extends Object
GraphUpdaterManager updaterManager = graph.getUpdaterManager();Each updater will run in its own thread. When changes to the graph have to be made by these updaters, this should be done via the execute method of this manager to prevent race conditions between graph write operations.
Constructor and Description |
---|
GraphUpdaterManager(Graph graph)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addUpdater(GraphUpdater updater)
Adds an updater to the manager and runs it immediately in its own thread.
|
void |
execute(GraphWriterRunnable runnable)
This is the method to use to modify the graph from the updaters.
|
void |
executeBlocking(GraphWriterRunnable runnable)
This is another method to use to modify the graph from the updaters.
|
GraphUpdater |
getUpdater(int id)
Just an example of fetching status information from the graph updater manager to expose it in a web service.
|
Map<Integer,String> |
getUpdaterDescriptions()
Just an example of fetching status information from the graph updater manager to expose it in a web service.
|
int |
size() |
void |
stop() |
public GraphUpdaterManager(Graph graph)
graph
- is parent graph of managerpublic void stop()
public void addUpdater(GraphUpdater updater)
updater
- is the updater to add and runpublic void execute(GraphWriterRunnable runnable)
runnable
- is a graph writer runnablepublic void executeBlocking(GraphWriterRunnable runnable) throws InterruptedException, ExecutionException
runnable
- is a graph writer runnableExecutionException
InterruptedException
GraphUpdaterManager.execute
public int size()
public Map<Integer,String> getUpdaterDescriptions()
public GraphUpdater getUpdater(int id)
Copyright © 2016. All rights reserved.