Class TransactionEvent

java.lang.Object
io.ebeaninternal.api.TransactionEvent
All Implemented Interfaces:
Serializable

public final class TransactionEvent extends Object implements Serializable
Holds information for a transaction. There is one TransactionEvent instance per Transaction instance.

When the associated Transaction commits or rollback this information is sent to the TransactionEventManager.

See Also:
  • Constructor Details

    • TransactionEvent

      public TransactionEvent()
      Create the TransactionEvent, one per Transaction.
  • Method Details

    • addDeleteById

      public void addDeleteById(BeanDescriptor<?> desc, Object id)
    • addDeleteByIdList

      public void addDeleteByIdList(BeanDescriptor<?> desc, List<Object> idList)
    • deleteByIdMap

      public DeleteByIdMap deleteByIdMap()
    • isLocal

      public boolean isLocal()
      Return true if this was a local transaction. Returns false if this transaction originated on another server in the cluster.
    • listenerNotify

      public List<PersistRequestBean<?>> listenerNotify()
      Return the list of PersistRequestBean's for this transaction.
    • eventTables

      public TransactionEventTable eventTables()
    • add

      public void add(String tableName, boolean inserts, boolean updates, boolean deletes)
    • add

      public void add(TransactionEventTable table)
    • addListenerNotify

      public void addListenerNotify(PersistRequestBean<?> request)
      Add post commit listeners. Watch this for large transactions.
    • buildCacheChanges

      public CacheChangeSet buildCacheChanges(TransactionManager manager)
      Build and return the cache changeSet.
    • obtainCacheChangeSet

      public CacheChangeSet obtainCacheChangeSet()
      Return the CacheChangeSet that we add cache notification messages to.

      We want to add to this change set as we process requests allowing the PersistRequestBean to be garbage collected for large transactions.