public class CacheEvent
extends java.util.EventObject
Modifier and Type | Class and Description |
---|---|
static class |
CacheEvent.EventType
Defines the ADDED, UPDATED, REMOVED and CLEARED event types, along
with their string representations, returned by toString().
|
Constructor and Description |
---|
CacheEvent(java.lang.Object source,
CacheEvent.EventType type,
java.lang.String key)
Creates a new object representing a cache event.
|
CacheEvent(java.lang.Object source,
CacheEvent.EventType type,
java.lang.String key,
java.lang.Object value)
Creates a new object representing a cache event.
|
CacheEvent(java.lang.Object source,
CacheEvent.EventType type,
java.lang.String key,
java.lang.Object value,
CacheItemRemovedReason reason)
Creates a new object representing a cache event.
|
Modifier and Type | Method and Description |
---|---|
CacheEvent.EventType |
getEventType()
Gets the type of event.
|
java.lang.String |
getKey()
Returns the Key of the item for which this event occured.
|
CacheItemRemovedReason |
getRemoveReason()
Returns the remove reason for the Reamve Event.
|
java.lang.Object |
getValue()
Returns the Value of the item for which this event occured.
|
public CacheEvent(java.lang.Object source, CacheEvent.EventType type, java.lang.String key)
source
- the cache object responsible for the eventtype
- the event typekey
- the key of the item added.public CacheEvent(java.lang.Object source, CacheEvent.EventType type, java.lang.String key, java.lang.Object value)
source
- the cache object responsible for the eventtype
- the event typekey
- the key of the item added.value
- the value of the item added.public CacheEvent(java.lang.Object source, CacheEvent.EventType type, java.lang.String key, java.lang.Object value, CacheItemRemovedReason reason)
source
- the cache object responsible for the eventtype
- the event typekey
- the key of the item added.value
- the value of the item added.reason
- the reason for the removal of the item from
the cache.CacheItemRemovedReason
public CacheEvent.EventType getEventType()
public java.lang.String getKey()
public java.lang.Object getValue()
public CacheItemRemovedReason getRemoveReason()