public interface SerializedCacheValue<V>
SerializedCacheValue
represents a serialized cache value. Instances of this
class obtained from a region can be put into another region without a copy of this value being
made. The two region entries will both have a reference to the same value.
If this value originated from a region stored off heap then this object can only be used as long
as notification method that obtained it has not returned. For example if your implementation of
CacheListener.afterUpdate(EntryEvent)
obtains one by calling
EntryEvent.getSerializedOldValue()
then the SerializedCacheValue returned is only valid
until your afterUpdate method returns. It is not safe to store instances of this class and use
them later when using off heap storage. Attempts to access off-heap data from this event after it
has expired will result in an IllegalStateException.
Modifier and Type | Method and Description |
---|---|
V |
getDeserializedValue()
Returns the deserialized object for this cache value.
|
byte[] |
getSerializedValue()
Returns the raw byte[] that represents this cache value.
|
byte[] getSerializedValue()
IllegalStateException
- if off-heap and called after the method that was passed the
EntryEvent that this serialize value was obtained from returns and this value does not
already have the serialized value.V getDeserializedValue()
IllegalStateException
- if off-heap and called after the method that was passed the
EntryEvent that this serialize value was obtained from returns.