Package org.cache2k.event
Interface CacheEntryEvictedListener<K,V>
-
- All Superinterfaces:
CacheEntryOperationListener<K,V>
,DataAware<K,V>
,EventListener
public interface CacheEntryEvictedListener<K,V> extends CacheEntryOperationListener<K,V>
Called when an entry gets evicted by the cache. Eviction means removal from the cache due to capacity constrains. For removal because of expiry a separate event is sent.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onEntryEvicted(Cache<K,V> cache, CacheEntry<K,V> entry)
Called upon eviction of a cache entry.
-
-
-
Method Detail
-
onEntryEvicted
void onEntryEvicted(Cache<K,V> cache, CacheEntry<K,V> entry) throws Exception
Called upon eviction of a cache entry. When used as synchronous listener other cache operations can still proceed except for this entry orCache.removeAll()
.- Parameters:
cache
- The cache that generated the evententry
- Entry containing the recent data- Throws:
Exception
-
-