# Package org.apache.geode.cache.operations

Contains the `OperationContext` interface that encapsulates an operation and the data associated with it for both the pre-operation and post-operation cases.

See: Description

- Class Summary
  Class | Description
  --- | ---
  CloseCQOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  DestroyOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  ExecuteCQOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  ExecuteFunctionOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  GetDurableCQsOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  GetOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  InterestOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  InterestType | Enumeration for various interest types supported by GemFire.
  InvalidateOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  KeyOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  KeySetOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  KeyValueOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  OperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  PutAllOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  PutOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  QueryOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RegionClearOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RegionCreateOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RegionDestroyOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RegionOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RegisterInterestOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  RemoveAllOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  StopCQOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead
  UnregisterInterestOperationContext | Deprecated since Geode1.0, use `ResourcePermission` instead

- Enum Summary
  Enum | Description
  --- | ---
  OperationContext.OperationCode |

## Package org.apache.geode.cache.operations Description

Contains the `OperationContext` interface that encapsulates an operation and the data associated with it for both the pre-operation and post-operation cases. It also contains implementations of the `OperationContext` interface for various kinds of cache operations.

These include:

`KeyOperationContext`: Implementation for operations that require a key for the operation. It provides a getKey method to obtain the key. Also provided are setCallbackArg and getCallbackArg methods that can be used to set/get an optional callback argument. The operations returned as KeyOperationContext are `OperationContext.OperationCode.DESTROY` and `OperationContext.OperationCode.CONTAINS_KEY`.

`KeyValueOperationContext`: Implementation for operations that require both key and value for the operation. It extends the `KeyOperationContext` implementation providing getValue and setValue methods in addition to those provided by the KeyOperationContext class. The operations returned as KeyValueOperationContext are `OperationContext.OperationCode.GET` and `OperationContext.OperationCode.PUT`. For the GET operation this is used to both the pre and post operation cases.

`InterestOperationContext`: Implementation for register and unregister of interest in a region. It defines a sub-class `InterestType` that encapsulates different kinds of interest viz. KEY, LIST, REGULAR_EXPRESSION, FILTER_CLASS and OQL_QUERY. It provides getInterestType method to get the interest type, getInterestResultPolicy method to get the `InterestResultPolicy` of the request, isUnregister method that returns true if this is an unregister operation, and getKey/setKey methods to get/set the key being registered. The key may be a single key, a list of keys, a regular expression string or an OQL `Query`.

`QueryOperationContext`: Implementation for a cache query operation for both the pre and post operation cases. It provides getQuery to get the query string as well as a modifyQuery method to be able to modify it. A utility getRegionNames method is also provided to obtain the list of regions as referenced by the query string. For the results in the post operation phase, getQueryResult allows getting the result and setQueryResult allows modification of the result.

`RegionOperationContext`: Implementation for the region level operation for the pre operation case. It provides getCallbackArg and setCallbackArg methods to get/set the optionally callback argument. The operations returned as RegionOperationContext are `OperationContext.OperationCode.REGION_CLEAR` and `OperationContext.OperationCode.REGION_DESTROY`.

`DestroyOperationContext`: Implementation for `OperationContext.OperationCode.DESTROY` operation having the key object for both the pre-operation and post-operation updates.

`CloseCQOperationContext`: Implementation for `OperationContext.OperationCode.CLOSE_CQ` operation for the pre-operation case.

`ExecuteCQOperationContext`: Implementation for `OperationContext.OperationCode.EXECUTE_CQ` operation for both the pre-operation and post-operation case.

`ExecuteFunctionOperationContext`: Implementation for `OperationContext.OperationCode.EXECUTE_FUNCTION` operation for the pre-operation case.

`GetOperationContext`: Implementation for `OperationContext.OperationCode.GET` operation having the key object for the pre-operation case and both key-value objects for the post-operation case.

`InvalidateOperationContext`: Implementation for `OperationContext.OperationCode.INVALIDATE` region operation having the key object for the pre-operation case and post-operation case.

`PutOperationContext`: Implementation for `OperationContext.OperationCode.PUT` operation having the key and value objects for the pre-operation case and post-operation case.

`PutAllOperationContext`: Implementation for `OperationContext.OperationCode.KEY_SET` operation having the key and value objects for the pre-operation case and post-operation case.

`RegionCreateOperationContext`: Implementation for `OperationContext.OperationCode.REGION_CREATE` operation for the pre-operation case and post-operation case.

`StopCQOperationContext`: Implementation for `OperationContext.OperationCode.STOP_CQ` operation for the pre-operation case.

`RegisterInterestOperationContext`: Implementation for `OperationContext.OperationCode.REGISTER_INTEREST` operation for the pre-operation case, which derives from `InterestOperationContext`

`UnregisterInterestOperationContext`: Implementation for `OperationContext.OperationCode.UNREGISTER_INTEREST` operation for the pre-operation case, which derives from `InterestOperationContext`