org.ehcache.impl.events
Class CacheEventAdapter<K,V>
java.lang.Object
org.ehcache.impl.events.CacheEventAdapter<K,V>
- Type Parameters:
K
- the type of the keys from the cacheV
- the type of the values from the cache
- All Implemented Interfaces:
- CacheEventListener<K,V>
public abstract class CacheEventAdapter<K,V>
- extends java.lang.Object
- implements CacheEventListener<K,V>
Adapter for cache event listener implementation that splits the event based on its type
to specific methods. This class by default provides only empty methods.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheEventAdapter
public CacheEventAdapter()
onEvent
public final void onEvent(CacheEvent<K,V> event)
- Description copied from interface:
CacheEventListener
- Invoked on any
CacheEvent
matching the EventType
constrain used
when the listener was registered. This method is invoked according to the EventOrdering
and EventFiring
requirement desired at registration time.
- Specified by:
onEvent
in interface CacheEventListener<K,V>
- Parameters:
event
- the actual CacheEvent
onEviction
protected void onEviction(K key,
V evictedValue)
onExpiry
protected void onExpiry(K key,
V expiredValue)
onRemoval
protected void onRemoval(K key,
V removedValue)
onUpdate
protected void onUpdate(K key,
V oldValue,
V newValue)
onCreation
protected void onCreation(K key,
V newValue)