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 TypeMethodDescriptionvoid
boolean
Template method for determining the global rollback-only flag of the underlying transaction, if any.boolean
Determine the rollback-only flag via checking this TransactionStatus.boolean
Check if the current TX is nested.default void
resume()
default void
suspend()
void
void
void
void
Methods inherited from interface io.micronaut.transaction.TransactionExecution
getTransactionDefinition, isCompleted, isNewTransaction, isRollbackOnly, setRollbackOnly
Methods 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
setRollbackOnly
on 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()
-