Enum Class TransactionalEventListener.TransactionPhase
java.lang.Object
java.lang.Enum<TransactionalEventListener.TransactionPhase>
io.micronaut.transaction.annotation.TransactionalEventListener.TransactionPhase
- All Implemented Interfaces:
Serializable
,Comparable<TransactionalEventListener.TransactionPhase>
,Constable
- Enclosing class:
- TransactionalEventListener
public static enum TransactionalEventListener.TransactionPhase
extends Enum<TransactionalEventListener.TransactionPhase>
The phase at which a transactional event listener applies.
- Since:
- 4.2
- Author:
- Stephane Nicoll, Juergen Hoeller, graemerocher
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFire the event after the commit has completed successfully.Fire the event after the transaction has completed.Fire the event if the transaction has rolled back.Fire the event before transaction commit. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BEFORE_COMMIT
Fire the event before transaction commit. -
AFTER_COMMIT
Fire the event after the commit has completed successfully.Note: This is a specialization of
AFTER_COMPLETION
and therefore executes in the same after-completion sequence of events, (and not inTransactionSynchronization.afterCommit()
). -
AFTER_ROLLBACK
Fire the event if the transaction has rolled back.Note: This is a specialization of
AFTER_COMPLETION
and therefore executes in the same after-completion sequence of events. -
AFTER_COMPLETION
Fire the event after the transaction has completed.For more fine-grained events, use
AFTER_COMMIT
orAFTER_ROLLBACK
to intercept transaction commit or rollback, respectively.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-