Package io.micronaut.transaction
Interface TransactionStatus<T>
- Type Parameters:
T
- The native transaction type
- All Superinterfaces:
TransactionExecution
- All Known Subinterfaces:
InternalTransaction<T>
- All Known Implementing Classes:
AbstractInternalTransaction
,DefaultTransactionStatus
The transaction status.
- Since:
- 1.0.0
- Author:
- graemerocher, Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptiondefault T
@NonNull ConnectionStatus<T>
@Nullable Object
default void
registerSynchronization
(@NonNull TransactionSynchronization synchronization) Register a new transaction synchronization for the current state.Methods inherited from interface io.micronaut.transaction.TransactionExecution
getTransactionDefinition, isCompleted, isNewTransaction, isRollbackOnly, setRollbackOnly
-
Method Details
-
getTransaction
- Returns:
- The underlying transaction object if exists.
-
getConnection
- Returns:
- The associated connection.
-
getConnectionStatus
- Returns:
- The connection status.
- Since:
- 4.0.0
-
registerSynchronization
Register a new transaction synchronization for the current state.Note that synchronizations can implement the
Ordered
interface. They will be executed in an order according to their order value (if any).- Parameters:
synchronization
- the synchronization object to register
-