IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1

com.ibm.websphere.objectgrid.plugins
LogElement

All Implemented Interfaces
Serializable


LogElements are the individual entries within a LogSequence. A LogElement has attributes such as operation type (delete, insert, update, etc.), current value, last access time, versioned value, etc. A LogElement is created during the transaction to record in-fly operations.

Field Summary
public  intCODE_INSERT
           The code constant for INSERT.
public  intCODE_UPDATE
           The code constant for UPDATE.
public  intCODE_DELETE
           The code constant for DELETE.
public  intCODE_EVICT
           The code constant for EVICT.
public  intCODE_FETCH
           The code constant for FETCH.
public  intCODE_TOUCH
           The code constant for TOUCH.
public  intCODE_UNDO_BEFORE_IMAGE_KEYWORDS
           The code constant for UNDO_BEFORE_IMAGE_KEYWORDS. Used when.
public  intCODE_UNDO_NOT_NEEDED
           The code constant for UNDO_NOT_NEEDED. Used to indicate no operation.
public  LogElement.TypeINSERT
           The Type that represents the INSERT operation.
public  LogElement.TypeUPDATE
           The Type that represents the UPDATE operation.
public  LogElement.TypeDELETE
           The Type that represents the DELETE operation.
public  LogElement.TypeEVICT
           The Type that represents the EVICT operation.
public  LogElement.TypeFETCH
           The Type that represents the FETCH operation.
public  LogElement.TypeTOUCH
           The Type that represents the TOUCH operation.
public  LogElement.TypeUNDO_BEFORE_IMAGE_KEYWORDS
           The Type that represents UNDO action remove keywords that are in raw before image keyword list.
public  LogElement.TypeUNDO_NOT_NEEDED
           The Type that represents UNDO action is NOT required for this LogElement.

Method Summary
public  LogElement.TypegetType()
           Gets the type of this LogElement. The type indicates what operation.
public  ObjectgetCurrentValue()
           Gets the value for this LogElement. This value can be cast to ValueProxyInfo.
public  CacheEntrygetCacheEntry()
           This returns the entry for this key.
public  booleanisPending()
           This is true if this delta has not been applied to a Loader yet. This can be false.
public  ObjectgetVersionedValue()
           This is the versioned object at the time the object was first associated with the transaction. The Loader.
public  voidsetVersionedValue(java.lang.Object)
           This is used to update the versioned object after an update of map entry occurs..
public  CollectiongetNewKeywords()
           This returns any new keywords that have been associated with this entry as a result of this transaction.
public  longgetLastAccessTime()
           This returns the last access time associated with this LogElement.
public  LogElement.TypegetUndoType()
           Returns what operation must be performed to "undo" a prior change the transaction made to the map entry.
public  ObjectgetBeforeImage()
           Gets the "before image" of the value object. The "before image" is the value.
public  ObjectgetAfterImage()
           Gets the "after image" value object. The "after image" is the value.

Field Detail

CODE_INSERT

public 
  static CODE_INSERT
The code constant for INSERT.

CODE_UPDATE

public 
  static CODE_UPDATE
The code constant for UPDATE.

CODE_DELETE

public 
  static CODE_DELETE
The code constant for DELETE.

CODE_EVICT

public 
  static CODE_EVICT
The code constant for EVICT.

CODE_FETCH

public 
  static CODE_FETCH
The code constant for FETCH.

CODE_TOUCH

public 
  static CODE_TOUCH
The code constant for TOUCH.

CODE_UNDO_BEFORE_IMAGE_KEYWORDS

public 
  static CODE_UNDO_BEFORE_IMAGE_KEYWORDS
The code constant for UNDO_BEFORE_IMAGE_KEYWORDS. Used when undoApplyPMap does not need to undo BackingMap changes, but it needs to invoke keyword manager to remove keywords that are in the raw before image keyword list.

CODE_UNDO_NOT_NEEDED

public 
  static CODE_UNDO_NOT_NEEDED
The code constant for UNDO_NOT_NEEDED. Used to indicate no operation is needed to undo the changes for this LogELement since this LogElement was never processed by applyPMap.

INSERT

public 
  static INSERT
The Type that represents the INSERT operation.

UPDATE

public 
  static UPDATE
The Type that represents the UPDATE operation.

DELETE

public 
  static DELETE
The Type that represents the DELETE operation.

EVICT

public 
  static EVICT
The Type that represents the EVICT operation.

FETCH

public 
  static FETCH
The Type that represents the FETCH operation.

TOUCH

public 
  static TOUCH
The Type that represents the TOUCH operation.

UNDO_BEFORE_IMAGE_KEYWORDS

public 
  static UNDO_BEFORE_IMAGE_KEYWORDS
The Type that represents UNDO action remove keywords that are in raw before image keyword list.

UNDO_NOT_NEEDED

public 
  static UNDO_NOT_NEEDED
The Type that represents UNDO action is NOT required for this LogElement.

Method Detail

getType

public LogElement.Type getType()
Gets the type of this LogElement. The type indicates what operation needs to be applied to the map entry.


Returns:
     the type of this LogElement. It can be one of: INSERT, UPDATE, DELETE, EVICT, FETCH, or TOUCH.


getCurrentValue

public Object getCurrentValue()
Gets the value for this LogElement. This value can be cast to ValueProxyInfo when a ValueInterface is in use in order to determine the set of dirty attributes.


Returns:
     the value in case of INSERT, UPDATE, or FETCH, null in case of DELETE or EVICT.


getCacheEntry

public CacheEntry getCacheEntry()
This returns the entry for this key. The key, current committed value etc can be accessed from this.
See Also:
    getCommittedValue()


Returns:
     CacheEntry


isPending

public boolean isPending()
This is true if this delta has not been applied to a Loader yet. This can be false if a transaction is flushed mid transaction to the back end.


Returns:
     boolean true if delta has not been applied to loader.


getVersionedValue

public Object getVersionedValue()
This is the versioned object at the time the object was first associated with the transaction. The Loader can supply this at that time. It may be the complete value or a subset containing maybe a version attribute. It depends on the Loader.


Returns:
     The versioned object.


setVersionedValue

public void setVersionedValue(Object v)
This is used to update the versioned object after an update of map entry occurs. The Loader can use this method when it is using an optimistic strategy and uses the OptimisticCallback#updateVersionedObjectForValue(Object) method to get an updated version object.
Parameters:
    v - The versioned object.


getNewKeywords

public Collection getNewKeywords()
This returns any new keywords that have been associated with this entry as a result of this transaction.


Returns:
     The list of new keywords.


getLastAccessTime

public long getLastAccessTime()
This returns the last access time associated with this LogElement.


Returns:
     last access time


getUndoType

public LogElement.Type getUndoType()
Returns what operation must be performed to "undo" a prior change the transaction made to the map entry. Note, an undo type of #UNDO_NOT_NEEDED is returned if nothing needs to be undone for this LogElement.


Returns:
     the "undo" type of this LogElement. It can be one of: INSERT, UPDATE, DELETE, or UNDO_NOT_NEEDED.


getBeforeImage

public Object getBeforeImage()
Gets the "before image" of the value object. The "before image" is the value object that existed in map entry prior to applying a change to map entry. Note, it is possible for a null reference to be returned (e.g. in the case where a new map entry is created).


Returns:
     the value prior to applying the change


getAfterImage

public Object getAfterImage()
Gets the "after image" value object. The "after image" is the value object that existed in map entry after applying a change to map entry. Note, it is possible for a null reference to be returned (e.g. in the case where a existing map entry is removed/evicted).


Returns:
     the value after applying the change


IBM WebSphere Extended Deployment (XD)TM
Release 6.0.1