|
IBM WebSphere® DataPower® XC10 Appliance Release 1.0 Client API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogElement
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 a transaction to record in-flight operations.
LogSequence
Nested Class Summary | |
---|---|
static class |
LogElement.Type
The Type class is used to represent a LogElement
type. |
Field Summary | |
---|---|
static LogElement.Type |
CLEAR
The Type that represents the CLEAR operation. |
static int |
CODE_CLEAR
The type code constant for CLEAR . |
static int |
CODE_DELETE
The type code constant for DELETE . |
static int |
CODE_EVICT
The type code constant for EVICT . |
static int |
CODE_FETCH
The type code constant for FETCH . |
static int |
CODE_INSERT
The type code constant for INSERT. |
static int |
CODE_TOUCH
The type code constant for TOUCH . |
static int |
CODE_UNDO_BEFORE_IMAGE_KEYWORDS
The code constant for UNDO_BEFORE_IMAGE_KEYWORDS . |
static int |
CODE_UNDO_NOT_NEEDED
The code constant for UNDO_NOT_NEEDED . |
static int |
CODE_UPDATE
The type code constant for UPDATE . |
static LogElement.Type |
DELETE
The Type that represents the DELETE operation. |
static LogElement.Type |
EVICT
The Type that represents the EVICT operation. |
static LogElement.Type |
FETCH
The Type that represents the FETCH operation. |
static LogElement.Type |
INSERT
The Type that represents the INSERT operation. |
static LogElement.Type |
TOUCH
The Type that represents the TOUCH operation. |
static LogElement.Type |
UNDO_BEFORE_IMAGE_KEYWORDS
The Type that represents the UNDO action to remove new
keyword associations that were introduced in this LogElement . |
static LogElement.Type |
UNDO_NOT_NEEDED
The Type that represents an UNDO action is NOT required for
this LogElement . |
static LogElement.Type |
UPDATE
The Type that represents the UPDATE operation. |
Method Summary | |
---|---|
java.lang.Object |
getAfterImage()
Gets the "after image" value object. |
java.lang.Object |
getBeforeImage()
Gets the "before image" of the value object. |
CacheEntry |
getCacheEntry()
Returns the CacheEntry for this key. |
java.lang.Object |
getCurrentValue()
Gets the value for this LogElement . |
java.lang.Object |
getKey()
Returns the key for this LogElement. |
long |
getLastAccessTime()
Returns the last access time associated with this LogElement . |
java.util.Collection |
getNewKeywords()
Returns any new keywords that have been associated with this entry as a result of this transaction. |
LogElement.Type |
getType()
Gets the type of this LogElement . |
LogElement.Type |
getUndoType()
Returns what operation must be performed to "undo" a prior change the transaction made to the map entry. |
java.lang.Object |
getVersionedValue()
Gets the versioned object at the time the object was first associated with the transaction. |
boolean |
isCascaded()
Answers true if this LogElement is a result of a cascade operation. |
boolean |
isPending()
Answers true if this change has NOT been applied to the loader. |
void |
setVersionedValue(java.lang.Object v)
Used to update the versioned object after an update of map entry occurs. |
Field Detail |
---|
static final int CODE_INSERT
INSERT
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_UPDATE
UPDATE
.
UPDATE
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_DELETE
DELETE
.
DELETE
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_EVICT
EVICT
.
EVICT
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_FETCH
FETCH
.
FETCH
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_TOUCH
TOUCH
.
TOUCH
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_UNDO_BEFORE_IMAGE_KEYWORDS
UNDO_BEFORE_IMAGE_KEYWORDS
. Used
when a rollback does not need to undo any applied BackingMap changes, but
it needs to invoke the keyword manager to remove any new keyword
associates for the map entry introduced in this
LogElement
.
getNewKeywords()
,
UNDO_BEFORE_IMAGE_KEYWORDS
,
Constant Field Valuesstatic final int CODE_CLEAR
CLEAR
.
CLEAR
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_UNDO_NOT_NEEDED
UNDO_NOT_NEEDED
. Used to indicate no
operation is needed to undo the changes for this LogElement
since this LogElement
was never processed.
UNDO_BEFORE_IMAGE_KEYWORDS
,
Constant Field Valuesstatic final LogElement.Type INSERT
Type
that represents the INSERT operation.
static final LogElement.Type UPDATE
Type
that represents the UPDATE operation.
static final LogElement.Type DELETE
Type
that represents the DELETE operation.
static final LogElement.Type EVICT
Type
that represents the EVICT operation.
static final LogElement.Type FETCH
Type
that represents the FETCH operation.
static final LogElement.Type TOUCH
Type
that represents the TOUCH operation.
static final LogElement.Type CLEAR
Type
that represents the CLEAR operation.
static final LogElement.Type UNDO_BEFORE_IMAGE_KEYWORDS
Type
that represents the UNDO action to remove new
keyword associations that were introduced in this LogElement
.
getNewKeywords()
static final LogElement.Type UNDO_NOT_NEEDED
Type
that represents an UNDO action is NOT required for
this LogElement
.
Method Detail |
---|
LogElement.Type getType()
LogElement
. The type indicates what operation
needs to be applied to the map entry.
LogElement
.
It can be one of: INSERT, UPDATE, DELETE, EVICT, FETCH, or TOUCH.LogElement.Type
java.lang.Object getCurrentValue()
LogElement
.
The returned value represents the new value that should be applied to the
BackingMap
and Loader
. This value can be cast
to ValueProxyInfo
when a value interface is in use in order
to determine the set of dirty attributes.
null
in the case of DELETE or EVICT.ValueProxyInfo
CacheEntry getCacheEntry()
CacheEntry
for this key.
The key, current committed value, etc. can be accessed from the
CacheEntry
.
CacheEntry.getCommittedValue()
,
getKey()
boolean isPending()
Changes can previously be applied to a loader using the
ObjectMap.flush()
or Session.flush()
methods.
This method reveals whether the change in this LogElement
has already been applied to the Loader using one of those methods.
ObjectMap.flush()
,
Session.flush()
java.lang.Object getVersionedValue()
OptimisticCallback
void setVersionedValue(java.lang.Object v)
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.
v
- The versioned object.OptimisticCallback#updateVersionedObjectForValue(Object)
java.util.Collection getNewKeywords()
long getLastAccessTime()
LogElement
.
LogElement.Type getUndoType()
Note, an undo type of UNDO_NOT_NEEDED
is returned if nothing
needs to be undone for this LogElement
.
LogElement
.
It can be one of: INSERT, UPDATE, DELETE, UNDO_NOT_NEEDED, or
UNDO_BEFORE_IMAGE_KEYWORDSjava.lang.Object getBeforeImage()
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).
java.lang.Object getAfterImage()
The "after image" is the value object that existed in map entry after
applying a change to the map entry. Note, it is possible for a
null
reference to be returned (e.g. in the case where an
existing map entry is removed/evicted).
boolean isCascaded()
ObjectGrid EntityManager supports cascade operations. For example, when persisting an
entity P, if P has a relation to entity C with CascadeType.PERSIST
enabled, C will also be persisted
as a result of the cascade operation. The method isCascaded() returns true for
the LogElement object which represents C, and the method returns false for the LogElement object which
represents P.
EntityManager
java.lang.Object getKey()
This method can be used instead of LogElement.getCacheEntry().getKey().
CacheEntry.getKey()
|
IBM WebSphere® DataPower® XC10 Appliance Release 1.0 Client API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |