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

public static enum TransactionAware.When extends Enum<TransactionAware.When>
Defines the different points, relative to a transaction's lifecycle, at which an event can be published.
  • Enum Constant Details

    • AFTER_COMMIT

      public static final TransactionAware.When AFTER_COMMIT
      The event should be published after the transaction has committed, but before it has completed.

      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

      public static final TransactionAware.When AFTER_COMPLETION
      The event should be published after the transaction has completed, whether it is committed or rolled back.
    • IMMEDIATE

      public static final TransactionAware.When 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 the TransactionAware annotation will produce the same behaviour.

  • Method Details

    • values

      public static TransactionAware.When[] 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

      public static TransactionAware.When valueOf(String name)
      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 name
      NullPointerException - if the argument is null