Interface TransactionAwareEvent
-
- All Known Implementing Classes:
AbstractPersistenceEvent,AfterItemCreationEvent,AfterItemRemovalEvent,RepollEvent
public interface TransactionAwareEventDecide whether the event should be behave during transactions as broadcasted/received delayed on commit or directly. AllAbstractEvents returning the samegetId()will only be published once at the end of a transaction ifpublishOnCommitOnly()returnstrue.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetId()Returns a unique id.booleanpublishOnCommitOnly()Decide whether this event should be broadcasted/received delayed on commit or directly this is useful if you want to publish custom event depending on the success of a running transaction if no transaction is running, the event is being sent immediately.
-
-
-
Method Detail
-
publishOnCommitOnly
boolean publishOnCommitOnly()
Decide whether this event should be broadcasted/received delayed on commit or directly this is useful if you want to publish custom event depending on the success of a running transaction if no transaction is running, the event is being sent immediately.
-
getId
java.lang.Object getId()
Returns a unique id. Two events with the same id in the same transaction will not get published twice.- Returns:
- the id
-
-