|
IBM WebSphereTM eXtreme Scale, Release 8.6 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.
For a LogElement on an ObjectMap
that is configured to use OutputFormat.RAW for the
keys or values, the keys or values objects in the LogElement will be SerializedKey
or
SerializedValue
objects respectively. If required, you can use the
SerializedEntry.getObject()
method to retrieve (possibly inflating the serialized object)
the original key or value object.
To override the map's output format configuration, use the PluginOutputFormat
annotation in the caller of the LogElement.
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_LOCK
The type code constant for LOCK . |
static int |
CODE_TOUCH
The type code constant for TOUCH . |
static int |
CODE_UNDO_NOT_NEEDED
The code constant for UNDO_NOT_NEEDED . |
static int |
CODE_UPDATE
The type code constant for UPDATE . |
static int |
CODE_UPSERT
The type code constant for UPSERT . |
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 |
LOCK
The Type that represents the LOCK operation. |
static LogElement.Type |
TOUCH
The Type that represents the TOUCH operation. |
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. |
static LogElement.Type |
UPSERT
The Type that represents the UPSERT operation. |
Method Summary | |
---|---|
Object |
getAfterImage()
Gets the "after image" value object. |
Object |
getBeforeImage()
Gets the "before image" of the value object. |
CacheEntry |
getCacheEntry()
Returns the CacheEntry for this key. |
Object |
getCurrentValue()
Gets the value for this LogElement . |
Object |
getKey()
Returns the key for this LogElement. |
long |
getLastAccessTime()
Returns the last access time associated with this LogElement . |
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. |
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(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_CLEAR
CLEAR
.
CLEAR
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_LOCK
LOCK
.
LOCK
,
LogElement.Type.getCode()
,
Constant Field Valuesstatic final int CODE_UPSERT
UPSERT
.
UPSERT
,
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 or it was an operation
that does not require an undo operation.
static 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 LOCK
Type
that represents the LOCK operation.
static final LogElement.Type UPSERT
Type
that represents the UPSERT operation.
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
Object getCurrentValue()
LogElement
.
For a LogElement on an ObjectMap
that is configured to use a ValueSerializerPlugin
, the
values in the LogSequence will be SerializedValue
objects. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original value object.
The original 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()
Object getVersionedValue()
For a LogElement on an ObjectMap
that is configured to use a
or ValueSerializerPlugin
, the versioned object will be returned
as an XsDataInputStream
, read
will be SerializedKey
or SerializedValue
objects respectively. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original key or value object.
For a LogElement on an ObjectMap
that is configured to use a ValueSerializerPlugin
that generates version objects, the version object will be the data stream
representing the data.
OptimisticCallback
void setVersionedValue(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)
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, or UNDO_NOT_NEEDEDObject 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).
For a LogElement on an ObjectMap
that is configured to use OutputFormat.RAW
for the values,
the value will be a SerializedValue
object. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original value object.
To override the map's output format configuration, use the PluginOutputFormat
annotation in the caller of the LogElement.
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).
For a LogElement on an ObjectMap
that is configured to use OutputFormat.RAW
for the value,
the value will be a SerializedValue
object. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original value object.
To override the map's output format configuration, use the PluginOutputFormat
annotation in the caller of the LogElement.
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
Object getKey()
For a LogElement on an ObjectMap
that is configured to use OutputFormat.RAW
for the keys,
the value will be a SerializedKey
object. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original key object.
To override the map's output format configuration, use the PluginOutputFormat
annotation in the caller of the LogElement.
This method can be used instead of LogElement.getCacheEntry().getKey().
CacheEntry.getKey()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |