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}
    • rollback

      void rollback(Transaction transaction)
      Rolls back the specified transaction. The actual job of rolling back the transaction is left to the relevant driver. if this is successful, the transaction is detached from this thread. If the specified transaction is not the correct one for this thread, throws an exception Warning: This method is meant to be called from actual transactions only!!!
      Parameters:
      transaction - the transaction to rollback
    • commit

      void commit(Transaction transaction)
      Commits the specified transaction. The actual job of committing the transaction is left to the relevant driver. if this is successful, the transaction is detached from this thread. If the specified transaction is not the correct one for this thread, throws an exception Warning: This method is meant to be called from actual transactions only!!!
      Parameters:
      transaction - the transaction to commit
    • getCurrentTransaction

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

      boolean canCommit()
    • canRollback

      boolean canRollback()
    • bookmark

      void bookmark(String bookmark)