Enum Class TransactionAware.When
java.lang.Object
java.lang.Enum<TransactionAware.When>
com.atlassian.bitbucket.event.annotation.TransactionAware.When
- All Implemented Interfaces:
Serializable
,Comparable<TransactionAware.When>
,Constable
- Enclosing class:
- TransactionAware
Defines the different points, relative to a transaction's lifecycle, at which an event can be published.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe event should be published after the transaction has committed, but before it hascompleted
.The event should be published after the transaction has completed, whether it iscommitted
or rolled back.The event should be published immediately, regardless of any transaction in progress. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionAware.When
Returns the enum constant of this class with the specified name.static TransactionAware.When[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AFTER_COMMIT
The event should be published after the transaction has committed, but before it hascompleted
.Note: If the transaction does not commit (for example, an optimistic locking failure triggers a rollback on the transaction), the event will never be published.
-
AFTER_COMPLETION
The event should be published after the transaction has completed, whether it iscommitted
or rolled back. -
IMMEDIATE
The event should be published immediately, regardless of any transaction in progress.Because
TransactionAware
is inherited, this entry allows derived classes to effectively disable transaction awareness imposed on them by superclasses. It should not be used otherwise; simply leaving off theTransactionAware
annotation will produce the same behaviour.
-
-
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
-