Class KeyValueOperationContext
java.lang.Object
org.apache.geode.cache.operations.OperationContext
org.apache.geode.cache.operations.KeyOperationContext
org.apache.geode.cache.operations.KeyValueOperationContext
- Direct Known Subclasses:
GetOperationContext,PutOperationContext
Deprecated.
Encapsulates a region operation that requires both key and serialized value for the pre-operation
and post-operation cases.
- Since:
- GemFire 5.5
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.geode.cache.operations.OperationContext
OperationContext.OperationCode -
Constructor Summary
ConstructorsConstructorDescriptionKeyValueOperationContext(Object key, Object value, boolean isObject) Deprecated.Constructor for the operation.KeyValueOperationContext(Object key, Object value, boolean isObject, boolean postOperation) Deprecated.Constructor for the operation. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Get the deserialized value for this operation.byte[]Deprecated.Get the serialized value for this operation.getValue()Deprecated.Get the value for this operation.booleanisObject()Deprecated.Return true when the value is an object and not a raw byte array.voidsetSerializedValue(byte[] serializedValue, boolean isObject) Deprecated.Set the serialized value object for this operation.voidDeprecated.Set the result value of the object for this operation.Methods inherited from class org.apache.geode.cache.operations.KeyOperationContext
getCallbackArg, getKey, getOperationCode, isPostOperation, setCallbackArg, setPostOperationMethods inherited from class org.apache.geode.cache.operations.OperationContext
isClientUpdate, isClientUpdate
-
Constructor Details
-
KeyValueOperationContext
Deprecated.Constructor for the operation.- Parameters:
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 array- Since:
- GemFire 6.5
-
KeyValueOperationContext
Deprecated.Constructor for the operation.- Parameters:
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 updates- Since:
- GemFire 6.5
-
-
Method Details
-
getSerializedValue
public byte[] getSerializedValue()Deprecated.Get the serialized value for this operation.- Returns:
- the serialized value for this operation or null if the value is not serialized
-
getDeserializedValue
Deprecated.Get the deserialized value for this operation. Note that if the value is serialized this method will attempt to deserialize it. If PDX read-serialized is set to true and the value was serialized with PDX then this method will return a PdxInstance.- Returns:
- the deserialized value for this operation
- Throws:
SerializationException- if deserialization of the value fails- Since:
- Geode 1.0
-
getValue
Deprecated.Get the value for this operation. Note that if the value is serialized then a byte array will be returned that contains the serialized bytes. To figure out if the returned byte array contains serialized bytes or is the deserialized value callisObject(). If you need to deserialize the serialized bytes useDataSerializer.readObject(java.io.DataInput)or you can just callgetDeserializedValue().- Returns:
- the value for this operation
- Since:
- GemFire 6.5
-
isObject
public boolean isObject()Deprecated.Return true when the value is an object and not a raw byte array.- Returns:
- true when the value is an object; false when it is a raw byte array
-
setSerializedValue
public void setSerializedValue(byte[] serializedValue, boolean isObject) Deprecated.Set the serialized value object for this operation.- Parameters:
serializedValue- the serialized value for this operationisObject- true when the value is an object; false when it is a raw byte array
-
setValue
Deprecated.Set the result value of the object for this operation.- Parameters:
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- Since:
- GemFire 6.5
-
ResourcePermissioninstead