Interface TransactionManager


public interface TransactionManager
Author:
Vince Bickers, Mark Angrish
  • Method Details

    • openTransaction

      Transaction openTransaction()
      Opens a new READ_WRITE transaction against a database instance. Instantiation of the transaction is left to the driver
      Returns:
      a new @{link Transaction}
    • openTransaction

      Transaction openTransaction(Transaction.Type type, Iterable<String> bookmarks)
      Opens a new transaction of the specified type against a database instance. Instantiation of the transaction is left to the driver
      Parameters:
      type - type of the transaction
      bookmarks - bookmarks to be passed to driver
      Returns:
      a new @{link Transaction}
    • close

      Closes the specified transaction if it belongs to the current thread. After the callback has successfully been called, the transaction will be detached from this transaction manager and the executing thread.

      The method must throw an exception if the transaction does not belong to the current thread.

      Parameters:
      transaction - The transaction to be closed
      callback - A callback to be executed prior to detaching the transaction from the thread.
    • getCurrentTransaction

      Transaction getCurrentTransaction()
      Returns the current transaction for this thread, or null if none exists
      Returns:
      this thread's transaction
    • bookmark

      void bookmark(String bookmark)