CacheEvent represents an internal cache event. It extends
java.util.EventObject. If an event happens on a cached object,
the source object in CacheEvent is the cached object which relates
to the event that just happened. If an event happens on a cache group,
the source object in CacheEvent is the group name which relates
to the event that just happened.
Event id is used to identify different types of events.
Application can register a CacheEventListener to handle
event.
Currently, only the OBJECT_INVALIDATED and OBJECT_UPDATED events are defined.
Represents the object updated event. This event can happen
when a cached object gets updated. This event usally triggered
by a CacheAccess.replace call.
Represents the object updated event. This event can happen
when a cached object gets updated. This event is triggered
by a CacheAccess.replace call. This event differs from the OBJECT_UPDATED
event in that it will be executed synchronously, within the callers thread
before the update call completes. With OBJECT_UPDATED, the event is
handled asynchronously by a background thread.
Represents the event when object or group invalidated due to ttl or
idletime expired.
This event can happen in the object or group time to live or idletime
expired.
Represents the event when object or group invalidated or removed due to
resource or capacity limit.
This event can happen in the object or group got invalidated or removed
when reaching the resource or capacity limit.
Represents the event when object or group invalidated due to ttl or
idletime expired.
This event can happen in the object or group time to live or idletime
expired.
Represents the event when object or group invalidated or removed due to
resource or capacity limit.
This event can happen in the object or group got invalidated or removed
when reaching the resource or capacity limit.
src - is the source object. If the event happens on a cached object,
the cached object is the source object. If the event happens on a cache
group, the group name is the source object.
id - is the event identifier. Currently, only OBJECT_INVALIDATED
and OBJECT_UPDATED are supported
Since:
2.0.0
Method Detail
getId
public int getId()
getId returns the event identifier.
Returns:
event identifier.
Since:
2.0.0
getName
public java.lang.Object getName()
getName returns the name of the object associated with the event
Returns:
object name
Since:
2.1.0
getSource
public java.lang.Object getSource()
getRegion
public java.lang.String getRegion()
getRegion returns the name of the region associated with the event