Class AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C>

java.lang.Object
io.micronaut.transaction.support.AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C>
Type Parameters:
C - The connection type
All Implemented Interfaces:
ReactiveTransactionStatus<C>, TransactionExecution
Enclosing class:
AbstractReactorTransactionOperations<C>

protected static final class AbstractReactorTransactionOperations.DefaultReactiveTransactionStatus<C> extends Object implements ReactiveTransactionStatus<C>
Represents the current reactive transaction status.
  • Constructor Details

  • Method Details

    • getConnectionStatus

      public ConnectionStatus<C> getConnectionStatus()
      Specified by:
      getConnectionStatus in interface ReactiveTransactionStatus<C>
      Returns:
      The connection status.
    • getTransactionDefinition

      public TransactionDefinition getTransactionDefinition()
      Description copied from interface: TransactionExecution
      The transaction definition.
      Specified by:
      getTransactionDefinition in interface TransactionExecution
      Returns:
      the transaction definition
    • getConnection

      public C getConnection()
      Specified by:
      getConnection in interface ReactiveTransactionStatus<C>
      Returns:
      The current connection.
    • isNewTransaction

      public boolean isNewTransaction()
      Description copied from interface: TransactionExecution
      Return whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.
      Specified by:
      isNewTransaction in interface TransactionExecution
      Returns:
      Whether the execution is a new transaction
    • setRollbackOnly

      public void setRollbackOnly()
      Description copied from interface: TransactionExecution
      Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, as alternative to throwing an exception which would in turn trigger a rollback.
      Specified by:
      setRollbackOnly in interface TransactionExecution
    • isRollbackOnly

      public boolean isRollbackOnly()
      Description copied from interface: TransactionExecution
      Return whether the transaction has been marked as rollback-only (either by the application or by the transaction infrastructure).
      Specified by:
      isRollbackOnly in interface TransactionExecution
      Returns:
      Whether the execution has been marked to rollback
    • isCompleted

      public boolean isCompleted()
      Description copied from interface: TransactionExecution
      Return whether this transaction is completed, that is, whether it has already been committed or rolled back.
      Specified by:
      isCompleted in interface TransactionExecution
      Returns:
      Whether the execution has completed