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.
  • 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.
      Specified by:
      success in interface Tx
    • failure

      public void failure()
      Description copied from interface: Tx
      Mark the transaction as failed. The autoclosable will invoke a rollback when completing.
      Specified by:
      failure in interface Tx
    • 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 interface AutoCloseable
      Specified by:
      close in interface Tx
      Specified by:
      close in interface WrappedTransaction
      Overrides:
      close in class DelegatingTransaction