IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1

com.ibm.websphere.objectgrid.plugins
ObjectGridEventListener



This interface could be used to create an implementation of an EventListener for the ObjectGrid. An instance of a ObjectGridEventListener would be set on the ObjectGrid. Any significant events will be communicated to the application via the methods outlined below.


Method Summary
public  voidinitialize(com.ibm.websphere.objectgrid.Session)
           This method will be invoked when the ObjectGrid itself is initialized..
public  voidtransactionBegin(java.lang.String, boolean)
           This event will signal the beginning of a transaction (session). A stringified.
public  voidtransactionEnd(java.lang.String, boolean, boolean, java.util.Collection)
          

This signals the ending of a transaction (session). A stringified.

public  voiddestroy()
           This method will be invoked when the ObjectGrid is destroyed. It's the.

Method Detail

initialize

public void initialize(Session session)
This method will be invoked when the ObjectGrid itself is initialized. A usable Session instance will be passed into this Listener to allow the for the optional replaying of a received LogSequence into a Map.
Parameters:
    session - The Session instance that this Listener is associated with.


transactionBegin

public void transactionBegin(String txid,boolean isWriteThroughEnabled)
This event will signal the beginning of a transaction (session). A stringified version of the TxID is provided for correlating with the end of the transaction (session), if so desired. The type of transaction (session) is also provided via the isWriteThroughEnabled boolean parameter.
Parameters:
    txid - Stringified version of the TxID
    isWriteThroughEnabled - Boolean flag indicating whether the Sesison was started via beginNoWriteThrough


transactionEnd

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

This signals the ending of a transaction (session). A stringified version of the TxID is provided for correlating with the begin of the transaction (session), if so desired. Changes are also reported. 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 order.

Parameters:
    txid - Stringified version of the TxID
    isWriteThroughEnabled - a boolean flag indicating whether the Sesison was started via beginNoWriteThrough
    committed - a boolean flag indicating whether the Session was committed (true) or rolled back (false)
    changes - A Collection of LogSequences that have been processed for the current Session.


destroy

public void destroy()
This method will be invoked when the ObjectGrid is destroyed. It's the opposite of initialize. When this method is called, the ObjectGridEventListener can free up any resource it uses.


IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1