IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.plugins
Interface ObjectGridEventGroup.TransactionEvents

Enclosing interface:
ObjectGridEventGroup

public static interface ObjectGridEventGroup.TransactionEvents

These events are called every single transaction. These are primarily used when transaction level listening is required. This is usually for pushing changes or invalidation events to peer caches for simple scenarios.


Method Summary
 void transactionBegin(String txid, boolean isWriteThroughEnabled)
          Signals the beginning of a Session transaction.
 void transactionEnd(String txid, boolean isWriteThroughEnabled, boolean committed, Collection changes)
          Signals the ending of a Session transaction.
 

Method Detail

transactionBegin

void transactionBegin(String txid,
                      boolean isWriteThroughEnabled)
Signals the beginning of a Session transaction.

A stringified version of the TxID is provided for correlating with the end of the transaction, if so desired. The type of transaction is also provided by the isWriteThroughEnabled boolean parameter.

Parameters:
txid - Stringified version of the TxID
isWriteThroughEnabled - boolean flag indicating whether the Session transaction was started using the Session.beginNoWriteThrough(). method. false is passed if beginNoWriteThrough() was used.
See Also:
Session.begin(), Session.beginNoWriteThrough()

transactionEnd

void transactionEnd(String txid,
                    boolean isWriteThroughEnabled,
                    boolean committed,
                    Collection changes)

Signals the ending of a Session transaction.

A string version of the TxID is provided for correlating with the begin of the transaction, if so desired. Map changes are also reported with the collection of LogSequences passed to this method. Typical uses of this event are for customers doing custom peer invalidation or peer commit push. This event listener gives them the changes. Calls to this method are made after commit and are sequenced so that they are delivered one by one, not in parallel. The event order is the commit and rollback order.

Parameters:
txid - string version of the TxID
isWriteThroughEnabled - boolean flag indicating whether the Session transaction was started using the Session.beginNoWriteThrough(). method. false is passed if beginNoWriteThrough() was used.
committed - a boolean flag indicating whether the transaction was committed (true) or rolled back (false)
changes - a Collection of LogSequences representing the changes that were committed or rolled back.
See Also:
LogSequence.isRollback(), Session.begin(), Session.beginNoWriteThrough(), Session.commit(), Session.rollback()

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.