com.gemstone.gemfire.cache.operations
Class GetOperationContext
java.lang.Object
com.gemstone.gemfire.cache.operations.OperationContext
com.gemstone.gemfire.cache.operations.KeyOperationContext
com.gemstone.gemfire.cache.operations.KeyValueOperationContext
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
GetOperationContext
public GetOperationContext(Object key,
boolean postOperation)
- Constructor for the operation.
- Parameters:
key
- the key for this operationpostOperation
- true if the context is for the post-operation case
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 objectisObject
- true when the value is an object (either serialized or
deserialized); false when it is a raw byte array
Copyright © 1997-2012 VMware, Inc. All rights reserved.