GetOperationContext (Apache Geode 1.15.4)

org.apache.geode.cache.operations

## Class GetOperationContext

- java.lang.Object
- - org.apache.geode.cache.operations.OperationContext
  - - org.apache.geode.cache.operations.KeyOperationContext
    - - org.apache.geode.cache.operations.KeyValueOperationContext
      - - org.apache.geode.cache.operations.GetOperationContext

- Deprecated.
  since Geode1.0, use `ResourcePermission` instead

      @Deprecated
      public class GetOperationContext
      extends KeyValueOperationContext

  Encapsulates a `OperationContext.OperationCode.GET` region operation having the key object for the pre-operation case and both key, value objects for the post-operation case.
  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 and Description
    `GetOperationContext(Object key, boolean postOperation)` Deprecated. Constructor for the operation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getObject()` Deprecated. Get the value of this get operation.
    `OperationContext.OperationCode` | `getOperationCode()` Deprecated. Return the operation associated with the `OperationContext` object.
    `void` | `setObject(Object value, boolean isObject)` Deprecated. Set the result value of the object for this operation.
    `void` | `setPostOperation()` Deprecated. Set the post-operation flag to true.

    - ### Methods inherited from class org.apache.geode.cache.operations.KeyValueOperationContext

      `getDeserializedValue, getSerializedValue, getValue, isObject, setSerializedValue, setValue`

    - ### Methods inherited from class org.apache.geode.cache.operations.KeyOperationContext

      `getCallbackArg, getKey, isPostOperation, setCallbackArg`

    - ### Methods inherited from class org.apache.geode.cache.operations.OperationContext

      `isClientUpdate, isClientUpdate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GetOperationContext

          public GetOperationContext(Object key,
                                     boolean postOperation)

      Deprecated.
      Constructor for the operation.
      Parameters:
        `key` - the key for this operation
        `postOperation` - true if the context is for the post-operation case

  - ### Method Detail

    - #### getOperationCode

          public OperationContext.OperationCode getOperationCode()

      Deprecated.
      Return the operation associated with the `OperationContext` object.
      Specified by:
        `getOperationCode` in class `KeyOperationContext`
      Returns:
        `OperationCode.GET`.

    - #### setPostOperation

          public void setPostOperation()

      Deprecated.
      Set the post-operation flag to true.
      Overrides:
        `setPostOperation` in class `KeyOperationContext`

    - #### getObject

          public Object getObject()

      Deprecated.
      Get the value of this get operation.
      Returns:
        the result of get operation; null when the result is a serialized value in which case user should invoke `KeyValueOperationContext.getSerializedValue()` or `KeyValueOperationContext.getDeserializedValue()`.

    - #### setObject

          public void setObject(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