Package io.ebeaninternal.api
Class TransactionEvent
- java.lang.Object
-
- io.ebeaninternal.api.TransactionEvent
-
- All Implemented Interfaces:
Serializable
public 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransactionEvent()
Create the TransactionEvent, one per Transaction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(TransactionEventTable table)
void
add(String tableName, boolean inserts, boolean updates, boolean deletes)
void
addDeleteById(BeanDescriptor<?> desc, Object id)
void
addDeleteByIdList(BeanDescriptor<?> desc, List<Object> idList)
void
addDocStoreUpdates(DocStoreUpdates docStoreUpdates)
Add any relevant PersistRequestBean's to DocStoreUpdates for later processing.void
addListenerNotify(PersistRequestBean<?> request)
Add post commit listeners.CacheChangeSet
buildCacheChanges(TransactionManager manager)
Build and return the cache changeSet.DeleteByIdMap
getDeleteByIdMap()
TransactionEventTable
getEventTables()
List<PersistRequestBean<?>>
getListenerNotify()
Return the list of PersistRequestBean's for this transaction.boolean
isLocal()
Return true if this was a local transaction.CacheChangeSet
obtainCacheChangeSet()
Return the CacheChangeSet that we add cache notification messages to.
-
-
-
Constructor Detail
-
TransactionEvent
public TransactionEvent()
Create the TransactionEvent, one per Transaction.
-
-
Method Detail
-
addDeleteById
public void addDeleteById(BeanDescriptor<?> desc, Object id)
-
addDeleteByIdList
public void addDeleteByIdList(BeanDescriptor<?> desc, List<Object> idList)
-
getDeleteByIdMap
public DeleteByIdMap getDeleteByIdMap()
-
isLocal
public boolean isLocal()
Return true if this was a local transaction. Returns false if this transaction originated on another server in the cluster.
-
getListenerNotify
public List<PersistRequestBean<?>> getListenerNotify()
Return the list of PersistRequestBean's for this transaction.
-
getEventTables
public TransactionEventTable getEventTables()
-
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.
-
addDocStoreUpdates
public void addDocStoreUpdates(DocStoreUpdates docStoreUpdates)
Add any relevant PersistRequestBean's to DocStoreUpdates for later processing.
-
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.
-
-