OperationContext (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache.operations, class: OperationContext

Package org.apache.geode.cache.operations

# Class OperationContext

java.lang.Object
org.apache.geode.cache.operations.OperationContext

Direct Known Subclasses:
  `ExecuteFunctionOperationContext`, `GetDurableCQsOperationContext`, `InterestOperationContext`, `KeyOperationContext`, `KeySetOperationContext`, `PutAllOperationContext`, `QueryOperationContext`, `RegionCreateOperationContext`, `RegionOperationContext`, `RemoveAllOperationContext`

@Deprecated public abstract class OperationContext extends Object
Deprecated.
since Geode1.0, use `ResourcePermission` instead
Encapsulates a cache operation and the data associated with it for both the pre-operation and post-operation cases. Implementations for specific operations will extend this with the specifics as required e.g. a getKey() method for a GET operation. Implementations for all the cache operations that require authorization are provided. Implementations of this interface are not expected to be thread-safe.

Since:
  GemFire 5.5

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `OperationContext.OperationCode`
  Deprecated.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OperationContext()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract OperationContext.OperationCode`
  `getOperationCode()`
  Deprecated.
  Return the operation code associated with the `OperationContext` object.
  `boolean`
  `isClientUpdate()`
  Deprecated.
  When called post-operation, returns true if the operation was one that performed an update.
  `boolean`
  `isClientUpdate(OperationContext context)`
  Deprecated.
  `abstract boolean`
  `isPostOperation()`
  Deprecated.
  True if the context is for post-operation.

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

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

- ## Constructor Details

  - ### OperationContext

    public OperationContext()
    Deprecated.

- ## Method Details

  - ### getOperationCode

    public abstract OperationContext.OperationCode getOperationCode()
    Deprecated.
    Return the operation code associated with the `OperationContext` object.
    Returns:
      the operation code associated with the `OperationContext` object

  - ### isPostOperation

    public abstract boolean isPostOperation()
    Deprecated.
    True if the context is for post-operation. The `OperationContext` interface encapsulates the data both before the operation is performed and after the operation is complete. For example, for a query operation the `Query` object as well as the list of region names referenced by the query would be part of the context object in the pre-processing stage. In the post-processing stage the context object shall contain results of the query.
    Returns:
      whether the context is for post-operation

  - ### isClientUpdate

    public boolean isClientUpdate()
    Deprecated.
    When called post-operation, returns true if the operation was one that performed an update. An update occurs when one of the following methods on `getOperationCode()` returns true: `isPut()`, `isPutAll()`, `isDestroy()`, `isRemoveAll()`, `isInvalidate()`, `isRegionCreate()`, `isRegionClear()`, `isRegionDestroy()`. Otherwise, returns false.
    Returns:
      whether the operation was one that performed an update
    Since:
      GemFire 6.6

  - ### isClientUpdate

    @Deprecated public boolean isClientUpdate(OperationContext context)
    Deprecated.
    True if the context is created before sending the updates to a client.
    Parameters:
      `context` - the context
    Returns:
      whether the context is created before sending the updates to a client