Interface TransactionManager

All Known Implementing Classes:
TransactionManagerAdapter

public interface TransactionManager
Entry point into the transaction subsystem.
  • Method Details

    • begin

      Begin a new transaction in the current context.
      Returns:
      The new transaction
      Throws:
      IllegalStateException - If there is already an active transaction in the current context.
    • ensure

      Transaction ensure()
      Ensure that there is a transaction in the context. If there is already an active transaction in the current context, no action will be taken, otherwise, a new one will be started.
      Returns:
      The current transaction.
    • getCurrent

      @Nullable @Nullable Transaction getCurrent()
      Get the current transaction of the context.
      Returns:
      The current transaction or null, if there is no active transaction.
    • requireCurrent

      Transaction requireCurrent()
      Get the current transaction of the context.
      Returns:
      The current transaction.
      Throws:
      IllegalStateException - if current == null