VMware GemFire Java API Reference
Package org.apache.geode.cache
Interface CacheEvent<K,V>
-
- All Known Subinterfaces:
EntryEvent<K,V>,RegionEvent<K,V>,RoleEvent<K,V>,TimestampedEntryEvent
public interface CacheEvent<K,V>A region- or entry-related event affecting the cache.Prior to release
6.0theNOT_AVAILABLEconstant was used to indicate an object value was not available. However in6.0generic typing was added toRegionand since this constant's type will not be an instance of the generic typeVreturning it would cause a ClassCastException. So in6.0and laternullis now used in place ofNOT_AVAILABLE.- Since:
- GemFire 2.0
- See Also:
CacheListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetCallbackArgument()Returns the callbackArgument passed to the method that generated this event.DistributedMembergetDistributedMember()Returns theDistributedMemberthat this event originated in.OperationgetOperation()Return a description of the operation that triggered this event.Region<K,V>getRegion()Returns the region to which this cached object belongs or the region that raised this event forRegionEvents.booleanisCallbackArgumentAvailable()Returnstrueif the callback argument is "available".booleanisOriginRemote()Answer true if this event originated in a cache other than this one.
-
-
-
Method Detail
-
getRegion
Region<K,V> getRegion()
Returns the region to which this cached object belongs or the region that raised this event forRegionEvents.- 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:
- GemFire 5.0
-
getCallbackArgument
java.lang.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 theRegioninterface methods that take a callbackArgument parameter.- Returns:
- the callbackArgument associated with this event.
nullis returned if the callback argument is not propagated to the event. This happens for events given toTransactionListenerand toCacheListeneron the remote side of a transaction commit.
-
isCallbackArgumentAvailable
boolean isCallbackArgumentAvailable()
Returnstrueif the callback argument is "available". Not available means that the callback argument may have existed but it could not be obtained. Note thatgetCallbackArgument()will returnnullwhen this method returnsfalse.- Returns:
- whether the callback argument is "available"
- Since:
- GemFire 6.0
-
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 theDistributedMemberthat this event originated in.- Returns:
- the member that performed the operation that originated this event.
- Since:
- GemFire 5.0
-
-