Interface TransactionContext

All Superinterfaces:

public interface TransactionContext extends TransactionalTaskContext
Provides a context to perform transactional operations: beginning/committing transactions, but also retrieving transactional data-structures like the TransactionalMap. Any method accessed through TransactionContext interface can throw TransactionException if transaction is no longer valid and rolled back.
  • Method Details

    • beginTransaction

      void beginTransaction()
      Begins a transaction.
      IllegalStateException - if a transaction already is active.
    • commitTransaction

      void commitTransaction() throws TransactionException
      Commits a transaction.
      TransactionException - if no transaction is active or the transaction could not be committed.
    • rollbackTransaction

      void rollbackTransaction()
      Rollback of the current transaction.
      IllegalStateException - if there is no active transaction.
    • getTxnId

      UUID getTxnId()
      Gets the ID that uniquely identifies the transaction.
      the transaction ID