GemFire 5.7

com.gemstone.gemfire.cache
Interface EntryEvent

All Superinterfaces:
CacheEvent

public interface EntryEvent
extends CacheEvent

Contains information about an event affecting an entry, including its identity and the the circumstances of the event. It is passed in to CacheListener, CapacityController, and CacheWriter.

Since:
3.0
See Also:
CacheListener, CacheWriter, RegionEvent

Field Summary
 
Fields inherited from interface com.gemstone.gemfire.cache.CacheEvent
NOT_AVAILABLE
 
Method Summary
 Object getKey()
          Returns the key.
 Object getNewValue()
          Returns the value in the cache after this event.
 Object getOldValue()
          Returns the value in the cache prior to this event.
 SerializedCacheValue getSerializedNewValue()
          Returns the serialized form of the value in the cache after this event.
 SerializedCacheValue getSerializedOldValue()
          Returns the serialized form of the value in the cache before this event.
 TransactionId getTransactionId()
          Gets the TransactionId for this EntryEvent.
 boolean hasClientOrigin()
          Returns true if this event originated on a client.
 boolean isBridgeEvent()
          Deprecated. as of 5.7 use hasClientOrigin() instead.
 boolean isLoad()
          Deprecated. as of GemFire 5.0, use Operation.isLoad() instead.
 boolean isLocalLoad()
          Deprecated. as of GemFire 5.0, use Operation.isLocalLoad() instead.
 boolean isNetLoad()
          Deprecated. as of GemFire 5.0, use Operation.isNetLoad() instead.
 boolean isNetSearch()
          Deprecated. as of GemFire 5.0, use Operation.isNetSearch() instead.
 
Methods inherited from interface com.gemstone.gemfire.cache.CacheEvent
getCallbackArgument, getDistributedMember, getOperation, getRegion, isDistributed, isExpiration, isOriginRemote
 

Method Detail

getKey

Object getKey()
Returns the key.

Returns:
the key

getOldValue

Object getOldValue()
Returns the value in the cache prior to this event. When passed to an event handler after an event occurs, this value reflects the value that was in the cache in this VM, not necessarily the value that was in the cache VM that initiated the operation. In certain scenarios the old value may no longer be available in which case the special constant NOT_AVAILABLE is returned. This can happen for disk regions when the old value is on disk only.

Returns:
the old value in the cache prior to this event, or CacheEvent.NOT_AVAILABLE. If the entry did not exist or was invalid, then null is returned.

getSerializedOldValue

SerializedCacheValue getSerializedOldValue()
Returns the serialized form of the value in the cache before this event.

Returns:
the serialized form of the value in the cache before this event
Since:
5.5

getNewValue

Object getNewValue()
Returns the value in the cache after this event.

Returns:
the value in the cache after this event

getSerializedNewValue

SerializedCacheValue getSerializedNewValue()
Returns the serialized form of the value in the cache after this event.

Returns:
the serialized form of the value in the cache after this event
Since:
5.5

isLocalLoad

boolean isLocalLoad()
Deprecated. as of GemFire 5.0, use Operation.isLocalLoad() instead.

Returns true if this event resulted from a loader running in this cache. Note that this will be true even if the local loader called netSearch.

Returns:
true if this event resulted from local loader execution

isNetLoad

boolean isNetLoad()
Deprecated. as of GemFire 5.0, use Operation.isNetLoad() instead.

Returns true if this event resulted from a loader running that was remote from the cache that requested it, i.e., a netLoad. Note that the cache that requested the netLoad may not be this cache in which case isOriginRemote will also return true.

Returns:
true if this event resulted from a netLoad

isLoad

boolean isLoad()
Deprecated. as of GemFire 5.0, use Operation.isLoad() instead.

Returns true if this event resulted from a loader.

Returns:
true if isLocalLoad or isNetLoad

isNetSearch

boolean isNetSearch()
Deprecated. as of GemFire 5.0, use Operation.isNetSearch() instead.

Returns true if this event resulted from a netSearch. If the netSearch was invoked by a loader however, this will return false and isLocalLoad() or isNetLoad() will return true instead.

Returns:
true if this event resulted from a netSearch

getTransactionId

TransactionId getTransactionId()
Gets the TransactionId for this EntryEvent.

Returns:
the ID of the transaction that performed the operation that generated this event; null if no transaction involved.
Since:
4.0

isBridgeEvent

boolean isBridgeEvent()
Deprecated. as of 5.7 use hasClientOrigin() instead.

Returns true if this event originated on a client.

Returns:
true if this event originated on a client.
Since:
5.1

hasClientOrigin

boolean hasClientOrigin()
Returns true if this event originated on a client.

Returns:
true if this event originated on a client.
Since:
5.7

GemFire 5.7

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