Package io.micronaut.transaction.impl
Interface InternalTransaction<T>
- Type Parameters:
 T- The transaction type
- All Superinterfaces:
 TransactionExecution,TransactionStatus<T>
- All Known Implementing Classes:
 AbstractInternalTransaction,DefaultTransactionStatus
The internal transaction representation.
- Since:
 - 4.0.0
 - Author:
 - Denis Stepanov
 
- 
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanTemplate method for determining the global rollback-only flag of the underlying transaction, if any.booleanDetermine the rollback-only flag via checking this TransactionStatus.booleanCheck if the current TX is nested.voidregisterInvocationSynchronization(@NonNull TransactionSynchronization synchronization) The variation ofTransactionStatus.registerSynchronization(TransactionSynchronization)that is always executed on the current TX invocation.default voidresume()default voidsuspend()voidvoidvoidvoidMethods inherited from interface io.micronaut.transaction.TransactionExecution
getTransactionDefinition, isCompleted, isNewTransaction, isRollbackOnly, setRollbackOnlyMethods inherited from interface io.micronaut.transaction.TransactionStatus
getConnection, getConnectionStatus, getTransaction, registerSynchronization 
- 
Method Details
- 
isNestedTransaction
boolean isNestedTransaction()Check if the current TX is nested.- Returns:
 - true if is nested transaction
 - Since:
 - 4.1.0
 
 - 
isLocalRollbackOnly
boolean isLocalRollbackOnly()Determine the rollback-only flag via checking this TransactionStatus.Will only return "true" if the application called
setRollbackOnlyon this TransactionStatus object.- Returns:
 - Whether is local rollback
 
 - 
isGlobalRollbackOnly
boolean isGlobalRollbackOnly()Template method for determining the global rollback-only flag of the underlying transaction, if any.This implementation always returns
false.- Returns:
 - Whether is global rollback
 
 - 
suspend
default void suspend() - 
resume
default void resume() - 
triggerBeforeCommit
void triggerBeforeCommit() - 
triggerAfterCommit
void triggerAfterCommit() - 
triggerBeforeCompletion
void triggerBeforeCompletion() - 
triggerAfterCompletion
 - 
cleanupAfterCompletion
void cleanupAfterCompletion() - 
registerInvocationSynchronization
void registerInvocationSynchronization(@NonNull @NonNull TransactionSynchronization synchronization) The variation ofTransactionStatus.registerSynchronization(TransactionSynchronization)that is always executed on the current TX invocation. The ordinaryTransactionStatus.registerSynchronization(TransactionSynchronization)will always bound the synchronization to the TX in progress.- Parameters:
 synchronization- The synchronization
 
 -