GemFire 6.0.1

com.gemstone.gemfire.cache.operations
Class KeyValueOperationContext

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
Direct Known Subclasses:
GetOperationContext, PutOperationContext

public abstract class KeyValueOperationContext
extends KeyOperationContext

Encapsulates a region operation that requires both key and serialized value for the pre-operation and post-operation cases.

Since:
5.5

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gemstone.gemfire.cache.operations.OperationContext
OperationContext.OperationCode
 
Constructor Summary
KeyValueOperationContext(Object key, byte[] serializedValue, boolean isObject)
          Constructor for the operation.
KeyValueOperationContext(Object key, byte[] serializedValue, boolean isObject, boolean postOperation)
          Constructor for the operation.
 
Method Summary
 byte[] getSerializedValue()
          Get the serialized value for this operation.
 boolean isObject()
          Return true when the value is an object and not a raw byte array.
 void setSerializedValue(byte[] serializedValue, boolean isObject)
          Set the serialized value object for this operation.
 
Methods inherited from class com.gemstone.gemfire.cache.operations.KeyOperationContext
getCallbackArg, getKey, getOperationCode, isPostOperation, setCallbackArg
 
Methods inherited from class com.gemstone.gemfire.cache.operations.OperationContext
isClientUpdate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyValueOperationContext

public KeyValueOperationContext(Object key,
                                byte[] serializedValue,
                                boolean isObject)
Constructor for the operation.

Parameters:
key - the key for this operation
serializedValue - the serialized value for this operation
isObject - true when the value is an object; false when it is a raw byte array

KeyValueOperationContext

public KeyValueOperationContext(Object key,
                                byte[] serializedValue,
                                boolean isObject,
                                boolean postOperation)
Constructor for the operation.

Parameters:
key - the key for this operation
serializedValue - the serialized value for this operation
isObject - true when the value is an object; false when it is a raw byte array
postOperation - true if the context is at the time of sending updates
Method Detail

getSerializedValue

public byte[] getSerializedValue()
Get the serialized value for this operation.

Returns:
the serialized value for this operation.

isObject

public boolean isObject()
Return true when the value is an object and not a raw byte array.

Returns:
true when the value is an object; false when it is a raw byte array

setSerializedValue

public void setSerializedValue(byte[] serializedValue,
                               boolean isObject)
Set the serialized value object for this operation.

Parameters:
serializedValue - the serialized value for this operation
isObject - true when the value is an object; false when it is a raw byte array

GemFire 6.0.1

Copyright © 2002-2009 GemStone Systems, Inc. All Rights Reserved.