public final class GraphManager extends Object
Graph
and TraversalSource
instances configured for the server to be passed to script
engine bindings. The Graph
instances are read from the Settings
for Gremlin Server as defined in
the configuration file. The TraversalSource
instances are rebound to the GraphManager
once
initialization scripts construct them.Constructor and Description |
---|
GraphManager(Settings settings)
Create a new instance using the
Settings from Gremlin Server. |
Modifier and Type | Method and Description |
---|---|
void |
commit(Set<String> graphSourceNamesToCloseTxOn)
Selectively commit transactions on the specified graphs or the graphs of traversal sources.
|
void |
commitAll()
Commit transactions across all
Graph objects. |
Bindings |
getAsBindings()
Get the
Graph and TraversalSource list as a set of bindings. |
Map<String,Graph> |
getGraphs()
Get a list of the
Graph instances and their binding names as defined in the Gremlin Server
configuration file. |
Map<String,TraversalSource> |
getTraversalSources()
Get a list of the
TraversalSource instances and their binding names as defined by Gremlin Server
initialization scripts. |
void |
rollback(Set<String> graphSourceNamesToCloseTxOn)
Selectively rollback transactions on the specified graphs or the graphs of traversal sources.
|
void |
rollbackAll()
Rollback transactions across all
Graph objects. |
public Map<String,Graph> getGraphs()
Graph
instances and their binding names as defined in the Gremlin Server
configuration file.public Map<String,TraversalSource> getTraversalSources()
TraversalSource
instances and their binding names as defined by Gremlin Server
initialization scripts.Map
where the key is the name of the TraversalSource
and the value is the
TraversalSource
itselfpublic Bindings getAsBindings()
Graph
and TraversalSource
list as a set of bindings.public void rollbackAll()
Graph
objects.public void rollback(Set<String> graphSourceNamesToCloseTxOn)
public void commitAll()
Graph
objects.Copyright © 2013–2017 Apache Software Foundation. All rights reserved.