public abstract class KeyValueOperationContext extends KeyOperationContext
OperationContext.OperationCode| Constructor and Description |
|---|
KeyValueOperationContext(java.lang.Object key,
java.lang.Object value,
boolean isObject)
Constructor for the operation.
|
KeyValueOperationContext(java.lang.Object key,
java.lang.Object value,
boolean isObject,
boolean postOperation)
Constructor for the operation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getDeserializedValue()
Get the deserialized value for this operation.
|
byte[] |
getSerializedValue()
Get the serialized value for this operation.
|
java.lang.Object |
getValue()
Get the value for this operation.
|
boolean |
isObject()
Return true when the value is an object and not a raw byte array.
|
void |
setSerializedValue(byte[] serializedValue,
boolean isObject)
Set the serialized value object for this operation.
|
void |
setValue(java.lang.Object value,
boolean isObject)
Set the result value of the object for this operation.
|
getCallbackArg, getKey, getOperationCode, isPostOperation, setCallbackArg, setPostOperationisClientUpdate, isClientUpdatepublic KeyValueOperationContext(java.lang.Object key,
java.lang.Object value,
boolean isObject)
key - the key for this operationvalue - the value for this operationisObject - true when the value is an object; false when it is a raw
byte arraypublic KeyValueOperationContext(java.lang.Object key,
java.lang.Object value,
boolean isObject,
boolean postOperation)
key - the key for this operationvalue - the value for this operationisObject - true when the value is an object; false when it is a raw
byte arraypostOperation - true if the context is at the time of sending updatespublic byte[] getSerializedValue()
public java.lang.Object getDeserializedValue()
throws SerializationException
SerializationException - if deserialization of the value failspublic java.lang.Object getValue()
isObject().
If you need to deserialize the serialized bytes use
DataSerializer.readObject(java.io.DataInput)
or you can just call getDeserializedValue().public boolean isObject()
public void setSerializedValue(byte[] serializedValue,
boolean isObject)
serializedValue - the serialized value for this operationisObject - true when the value is an object; false when it is a raw
byte arraypublic void setValue(java.lang.Object value,
boolean isObject)
value - the result of this operation; can be a serialized byte array
or a deserialized objectisObject - true when the value is an object (either serialized or
deserialized); false when it is a raw byte array