public static final enum

TransactionAware.When

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.atlassian.stash.event.annotation.TransactionAware.When

Class Overview

Defines the different points, relative to a transaction's lifecycle, at which an event can be published.

Summary

Enum Values
TransactionAware.When  AFTER_COMMIT  The event should be published after the transaction has committed, but before it has completed
TransactionAware.When  AFTER_COMPLETION  The event should be published after the transaction has completed, whether it is committed or rolled back
TransactionAware.When  IMMEDIATE  The event should be published immediately, regardless of any transaction in progress. 
Public Methods
static TransactionAware.When valueOf(String name)
final static When[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

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.

public static final TransactionAware.When AFTER_COMPLETION

The event should be published after the transaction has completed, whether it is committed or rolled back.

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.

Public Methods

public static TransactionAware.When valueOf (String name)

public static final When[] values ()