Tx - A GraknTx extending EmbeddedGraknTx and wrapping a Tinkerpop GraphG - A vendor implementation of a Tinkerpop Graphpublic abstract class TxFactoryAbstract<Tx extends EmbeddedGraknTx<G>,G extends org.apache.tinkerpop.gremlin.structure.Graph> extends Object implements TxFactory<G>
Defines the abstract construction of GraknTxs on top of Tinkerpop Graphs.
For this factory to function a vendor specific implementation of a graph extending
EmbeddedGraknTx must be provided. This must be provided with a matching TinkerPop Graph
which is wrapped within the GraknTx
| Modifier and Type | Field and Description |
|---|---|
protected ai.grakn.factory.TxFactoryAbstract.GraphWithTx |
batchTinkerPopGraphWithTx |
protected ai.grakn.factory.TxFactoryAbstract.GraphWithTx |
tinkerPopGraphWithTx |
| Modifier | Constructor and Description |
|---|---|
protected |
TxFactoryAbstract(EmbeddedGraknSession session) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Tx |
buildGraknTxFromTinkerGraph(G graph) |
protected abstract G |
buildTinkerPopGraph(boolean batchLoading) |
protected abstract G |
getGraphWithNewTransaction(G graph,
boolean batchloading) |
G |
getTinkerPopGraph(boolean batchLoading) |
Tx |
open(GraknTxType txType) |
EmbeddedGraknSession |
session() |
protected final ai.grakn.factory.TxFactoryAbstract.GraphWithTx batchTinkerPopGraphWithTx
protected final ai.grakn.factory.TxFactoryAbstract.GraphWithTx tinkerPopGraphWithTx
protected TxFactoryAbstract(EmbeddedGraknSession session)
protected abstract G buildTinkerPopGraph(boolean batchLoading)
public final Tx open(GraknTxType txType)
public final G getTinkerPopGraph(boolean batchLoading)
getTinkerPopGraph in interface TxFactory<G extends org.apache.tinkerpop.gremlin.structure.Graph>batchLoading - A flag which indicates if the graph has batch loading enabled or not.@CheckReturnValue(when=NEVER) protected abstract G getGraphWithNewTransaction(G graph, boolean batchloading)
public final EmbeddedGraknSession session()
Copyright © 2018 Grakn Labs Ltd. All rights reserved.