IBM WebSphere Extended Deployment (XD)TM
Release 6.0

com.ibm.websphere.objectgrid.plugins
LogSequence

All Implemented Interfaces
Serializable


LogSequence is the ordered list of changes performed against a given map for a given transaction. These changes are recorded as LogElement objects.


Method Summary
public  intsize()
           This method returns the total number of LogElements within this LogSequence.
public  IteratorgetPendingChanges()
           This method will return an iterator for processing all of the "pending" changes for a LogSequence (for example, pending inserts, updates, and deletes).
public  IteratorgetAllChanges()
           This method will return an iterator for processing all of the changes for a LogSequence.
public  IteratorgetChangesByTypes(java.util.Collection)
           This method will return an iterator for processing the LogElements that are of the proper type (based on the input parameter).
public  IteratorgetChangesByKeys(java.util.Collection)
           This method will return an iterator for processing the LogElements that have the proper key based on the input parameter.
public  StringgetMapName()
           This returns the name of the Map that these changes apply to..
public  StringgetObjectGridName()
           This returns the name of the ObjectGrid that houses the Map that these changes apply to.
public  booleanisDirty()
           This method returns whether this LogSequence has any LogElements that would "dirty" a Map.
public  booleanisRollback()
           Returns whether or not this LogSequence was generated to rollback a transaction.

Method Detail

size

public int size()
This method returns the total number of LogElements within this LogSequence.


Returns:
     int Total number of LogElements


getPendingChanges

public Iterator getPendingChanges()
This method will return an iterator for processing all of the "pending" changes for a LogSequence (for example, pending inserts, updates, and deletes). This is normally used by the CacheLoaders.


Returns:
     an Iterator for processing the pending LogElement changes


getAllChanges

public Iterator getAllChanges()
This method will return an iterator for processing all of the changes for a LogSequence. This would normally be used by the Evictors and other plugins that want to know all of the changes introduced by this LogSequence.


Returns:
     an Iterator for processing all of the LogElement changes


getChangesByTypes

public Iterator getChangesByTypes(Collection types)
This method will return an iterator for processing the LogElements that are of the proper type (based on the input parameter). Each member of the input Collection should be one of the defined LogElement Types (INSERT, UPDATE, DELETE, FETCH, TOUCH, or EVICT).
Parameters:
    types - A Collection of LogElement Types (INSERT, UPDATE, etc)


Returns:
     Iterator for processing all LogElements that support the input Type(s)


getChangesByKeys

public Iterator getChangesByKeys(Collection keys)
This method will return an iterator for processing the LogElements that have the proper key based on the input parameter.
Parameters:
    keys - A collection of key objects


Returns:
     an Iterator for processing all LogElements that match the input key(s)


getMapName

public String getMapName()
This returns the name of the Map that these changes apply to. The caller can then use this name as input to the Session.getMap(string) method.


Returns:
     The name of the ObjectMap that these changes apply to


getObjectGridName

public String getObjectGridName()
This returns the name of the ObjectGrid that houses the Map that these changes apply to.


Returns:
     The name of the ObjectGrid that this LogSequence is associated with


isDirty

public boolean isDirty()
This method returns whether this LogSequence has any LogElements that would "dirty" a Map. That is, if it contains any LogElements of any type other than Fetch/Get, then it is considered "dirty".


Returns:
     true, if LogSequence would modify a Map, if applied; false, if LogSequence would not modify a Map, if applied


isRollback

public boolean isRollback()
Returns whether or not this LogSequence was generated to rollback a transaction. Note, depending on when this LogSequence is used, the transaction itself might already be rolled back.


Returns:
     boolean true iff LogSequence generated to rollback a transaction.


IBM WebSphere Extended Deployment (XD)TM
Release 6.0