VMware GemFire Java API Reference
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 public abstract class KeyValueOperationContext extends KeyOperationContext
Deprecated.since Geode1.0, useResourcePermissioninsteadEncapsulates 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
Constructors Constructor Description KeyValueOperationContext(java.lang.Object key, java.lang.Object value, boolean isObject)Deprecated.Constructor for the operation.KeyValueOperationContext(java.lang.Object key, java.lang.Object value, boolean isObject, boolean postOperation)Deprecated.Constructor for the operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.ObjectgetDeserializedValue()Deprecated.Get the deserialized value for this operation.byte[]getSerializedValue()Deprecated.Get the serialized value for this operation.java.lang.ObjectgetValue()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.voidsetValue(java.lang.Object value, boolean isObject)Deprecated.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, setPostOperation
-
Methods inherited from class org.apache.geode.cache.operations.OperationContext
isClientUpdate, isClientUpdate
-
-
-
-
Constructor Detail
-
KeyValueOperationContext
public KeyValueOperationContext(java.lang.Object key, java.lang.Object value, boolean isObject)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
public KeyValueOperationContext(java.lang.Object key, java.lang.Object value, boolean isObject, boolean postOperation)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 Detail
-
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
public java.lang.Object getDeserializedValue() throws SerializationExceptionDeprecated.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
public java.lang.Object 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
public void setValue(java.lang.Object value, boolean isObject)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
-
-