Interface TransactionAwareEvent

All Known Implementing Classes:
AbstractPersistenceEvent, AfterItemCreationEvent, AfterItemRemovalEvent, RepollEvent

public interface TransactionAwareEvent
Decide whether the event should be behave during transactions as broadcasted/received delayed on commit or directly. All AbstractEvents returning the same getId() will only be published once at the end of a transaction if publishOnCommitOnly() returns true.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a unique id.
    boolean
    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 Details

    • 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

      Object getId()
      Returns a unique id. Two events with the same id in the same transaction will not get published twice.
      Returns:
      the id