Package org.ehcache.event
Interface CacheEvent<K,V>
-
- Type Parameters:
K- the key type of the source cacheV- the value type of the source cache
public interface CacheEvent<K,V>An event resulting from a mutativeCacheoperation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description KgetKey()The key of the mapping affected by this event.VgetNewValue()The mapped value immediately after the mutative event occurred.VgetOldValue()The mapped value immediately before the mutative event occurred.Cache<K,V>getSource()Deprecated.EventTypegetType()Gets theEventTypeof this event.
-
-
-
Method Detail
-
getKey
K getKey()
The key of the mapping affected by this event.- Returns:
- the key of the mutated mapping
-
getNewValue
V getNewValue()
The mapped value immediately after the mutative event occurred.If the mutative event removes the mapping then
nullis returned.- Returns:
- the mapped value after the mutation
-
getOldValue
V getOldValue()
The mapped value immediately before the mutative event occurred.If the mutative event created the mapping then
nullis returned.- Returns:
- the mapped value before the mutation
-
-