Class KeyValueOperationContext

Direct Known Subclasses:
GetOperationContext, PutOperationContext

@Deprecated public abstract class KeyValueOperationContext extends KeyOperationContext
Deprecated.
since Geode1.0, use ResourcePermission instead
Encapsulates a region operation that requires both key and serialized value for the pre-operation and post-operation cases.
Since:
GemFire 5.5
  • Constructor Details

    • KeyValueOperationContext

      public KeyValueOperationContext(Object key, Object value, boolean isObject)
      Deprecated.
      Constructor for the operation.
      Parameters:
      key - the key for this operation
      value - the value for this operation
      isObject - true when the value is an object; false when it is a raw byte array
      Since:
      GemFire 6.5
    • KeyValueOperationContext

      public KeyValueOperationContext(Object key, Object value, boolean isObject, boolean postOperation)
      Deprecated.
      Constructor for the operation.
      Parameters:
      key - the key for this operation
      value - the value for this operation
      isObject - true when the value is an object; false when it is a raw byte array
      postOperation - 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

      public Object getDeserializedValue() throws SerializationException
      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

      public 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 call isObject(). If you need to deserialize the serialized bytes use DataSerializer.readObject(java.io.DataInput) or you can just call getDeserializedValue().
      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 operation
      isObject - true when the value is an object; false when it is a raw byte array
    • setValue

      public void setValue(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 object
      isObject - true when the value is an object (either serialized or deserialized); false when it is a raw byte array
      Since:
      GemFire 6.5