Package com.syncleus.ferma.tx
Class AbstractTx<G extends FramedTxGraph>
java.lang.Object
com.syncleus.ferma.DelegatingTransaction
com.syncleus.ferma.tx.AbstractTx<G>
- All Implemented Interfaces:
Tx
,WrappedTransaction
,AutoCloseable
public abstract class AbstractTx<G extends FramedTxGraph> extends DelegatingTransaction implements Tx
An abstract class that can be used to implement vendor specific graph database Tx classes.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractTx(org.apache.tinkerpop.gremlin.structure.Transaction delegate, WrappedFramedGraph<? extends org.apache.tinkerpop.gremlin.structure.Graph> parentGraph)
-
Method Summary
Methods inherited from class com.syncleus.ferma.DelegatingTransaction
addTransactionListener, clearTransactionListeners, commit, createThreadedTx, getDelegate, getGraph, isOpen, open, readWrite, removeTransactionListener, rollback
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.syncleus.ferma.WrappedTransaction
addTransactionListener, clearTransactionListeners, commit, createThreadedTx, getDelegate, getGraph, isOpen, open, readWrite, removeTransactionListener, rollback
-
Constructor Details
-
AbstractTx
public AbstractTx(org.apache.tinkerpop.gremlin.structure.Transaction delegate, WrappedFramedGraph<? extends org.apache.tinkerpop.gremlin.structure.Graph> parentGraph)
-
-
Method Details
-
success
public void success()Description copied from interface:Tx
Mark the transaction as succeeded. The autoclosable will invoke a commit when completing. -
failure
public void failure()Description copied from interface:Tx
Mark the transaction as failed. The autoclosable will invoke a rollback when completing. -
close
public void close()Description copied from interface:Tx
Invoke rollback or commit when closing the autoclosable. By default a rollback will be invoked.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTx
- Specified by:
close
in interfaceWrappedTransaction
- Overrides:
close
in classDelegatingTransaction
-