GemFire 5.5.1

com.gemstone.gemfire.cache
Interface CacheEvent

All Known Subinterfaces:
EntryEvent, RegionEvent, RoleEvent

public interface CacheEvent

A region- or entry-related event affecting the cache.

Since:
2.0
See Also:
CacheListener

Field Summary
static Object NOT_AVAILABLE
          Constant used to indicate that a value not available One case this is used is when a value would be too expensive to obtain (an example being old values on a entry that have been written to disk).
 
Method Summary
 Object getCallbackArgument()
          Returns the callbackArgument passed to the method that generated this event.
 DistributedMember getDistributedMember()
          Returns the DistributedMember that this event originated in.
 Operation getOperation()
          Return a description of the operation that triggered this event.
 Region getRegion()
          Returns the region to which this cached object belongs or the region that raised this event for RegionEvents.
 boolean isDistributed()
          Deprecated. as of GemFire 5.0, use Operation.isDistributed() instead.
 boolean isExpiration()
          Deprecated. as of GemFire 5.0, use Operation.isExpiration() instead.
 boolean isOriginRemote()
          Answer true if this event originated in a cache other than this one.
 

Field Detail

NOT_AVAILABLE

static final Object NOT_AVAILABLE
Constant used to indicate that a value not available One case this is used is when a value would be too expensive to obtain (an example being old values on a entry that have been written to disk). Another case is when an attribute is never available in certain contexts (an example being callback argument on the remote side of a transaction).

See Also:
getCallbackArgument(), EntryEvent.getOldValue(), EntryEvent.getNewValue()
Method Detail

getRegion

Region getRegion()
Returns the region to which this cached object belongs or the region that raised this event for RegionEvents.

Returns:
the region associated with this object or the region that raised this event.

getOperation

Operation getOperation()
Return a description of the operation that triggered this event.

Returns:
the operation that triggered this event.
Since:
5.0

getCallbackArgument

Object getCallbackArgument()
Returns the callbackArgument passed to the method that generated this event. Provided primarily in case this object or region has already been destroyed. See the Region interface methods that take a callbackArgument parameter.

Returns:
the callbackArgument associated with this event. NOT_AVAILABLE is returned if the callback argument is not propagated to the event. This happens for events given to TransactionListener and to CacheListener on the remote side of a transaction commit.

isOriginRemote

boolean isOriginRemote()
Answer true if this event originated in a cache other than this one. Answer false if this event originated in this cache.

Returns:
true if this event originated remotely

getDistributedMember

DistributedMember getDistributedMember()
Returns the DistributedMember that this event originated in.

Returns:
the member that performed the operation that originated this event.
Since:
5.0

isExpiration

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

Answer true if this event resulted from expiration.

Returns:
true if this event resulted from expiration

isDistributed

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

Answers true if this event resulted from a distributed operation; false if a local operation. This is useful to distinguish between invalidate and localInvalidate, and destroy and localDestroy.

Returns:
true if this event resulted from a distributed operation

GemFire 5.5.1

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