GemFire 6.6.4

com.gemstone.gemfire.cache.operations
Class GetOperationContext

java.lang.Object
  extended by com.gemstone.gemfire.cache.operations.OperationContext
      extended by com.gemstone.gemfire.cache.operations.KeyOperationContext
          extended by com.gemstone.gemfire.cache.operations.KeyValueOperationContext
              extended by com.gemstone.gemfire.cache.operations.GetOperationContext

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:
5.5

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gemstone.gemfire.cache.operations.OperationContext
OperationContext.OperationCode
 
Constructor Summary
GetOperationContext(Object key, boolean postOperation)
          Constructor for the operation.
 
Method Summary
 Object getObject()
          Get the value of this get operation.
 OperationContext.OperationCode getOperationCode()
          Return the operation associated with the OperationContext object.
 void setObject(Object value, boolean isObject)
          Set the result value of the object for this operation.
 void setPostOperation()
          Set the post-operation flag to true.
 
Methods inherited from class com.gemstone.gemfire.cache.operations.KeyValueOperationContext
getSerializedValue, getValue, isObject, setSerializedValue, setValue
 
Methods inherited from class com.gemstone.gemfire.cache.operations.KeyOperationContext
getCallbackArg, getKey, isPostOperation, setCallbackArg
 
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

GetOperationContext

public GetOperationContext(Object key,
                           boolean postOperation)
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()
Return the operation associated with the OperationContext object.

Specified by:
getOperationCode in class KeyOperationContext
Returns:
OperationCode.GET.

setPostOperation

public void setPostOperation()
Set the post-operation flag to true.


getObject

public Object getObject()
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()

setObject

public void setObject(Object value,
                      boolean isObject)
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

GemFire 6.6.4

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