GemFire 6.6

com.gemstone.gemfire.cache.operations
Class KeyOperationContext

java.lang.Object
  extended by com.gemstone.gemfire.cache.operations.OperationContext
      extended by com.gemstone.gemfire.cache.operations.KeyOperationContext
Direct Known Subclasses:
DestroyOperationContext, InvalidateOperationContext, KeyValueOperationContext

public abstract class KeyOperationContext
extends OperationContext

Encapsulates a region operation that requires only a key object for the pre-operation case. The operations this class encapsulates are OperationContext.OperationCode.DESTROY and OperationContext.OperationCode.CONTAINS_KEY.

Since:
5.5

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gemstone.gemfire.cache.operations.OperationContext
OperationContext.OperationCode
 
Constructor Summary
KeyOperationContext(Object key)
          Constructor for the operation.
KeyOperationContext(Object key, boolean postOperation)
          Constructor for the operation.
 
Method Summary
 Object getCallbackArg()
          Get the callback argument object for this operation.
 Object getKey()
          Get the key object for this operation.
abstract  OperationContext.OperationCode getOperationCode()
          Return the operation associated with the OperationContext object.
 boolean isPostOperation()
          True if the context is for post-operation.
 void setCallbackArg(Object callbackArg)
          Set the callback argument object for this operation.
 
Methods inherited from class com.gemstone.gemfire.cache.operations.OperationContext
isClientUpdate, isClientUpdate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyOperationContext

public KeyOperationContext(Object key)
Constructor for the operation.

Parameters:
key - the key for this operation

KeyOperationContext

public KeyOperationContext(Object key,
                           boolean postOperation)
Constructor for the operation.

Parameters:
key - the key for this operation
postOperation - true to set the post-operation flag
Method Detail

getOperationCode

public abstract OperationContext.OperationCode getOperationCode()
Return the operation associated with the OperationContext object.

Specified by:
getOperationCode in class OperationContext
Returns:
The OperationCode of this operation. This is one of OperationContext.OperationCode.DESTROY or OperationContext.OperationCode.CONTAINS_KEY for KeyOperationContext, and one of OperationContext.OperationCode.GET or OperationContext.OperationCode.PUT for KeyValueOperationContext.

isPostOperation

public boolean isPostOperation()
True if the context is for post-operation.

Specified by:
isPostOperation in class OperationContext

getKey

public Object getKey()
Get the key object for this operation.

Returns:
the key object for this operation.

getCallbackArg

public Object getCallbackArg()
Get the callback argument object for this operation.

Returns:
the callback argument object for this operation.

setCallbackArg

public void setCallbackArg(Object callbackArg)
Set the callback argument object for this operation.

Parameters:
callbackArg - the callback argument object for this operation.

GemFire 6.6

Copyright © 1997-2011 VMware, Inc. All rights reserved.