Class JCacheEvictionListener<K,V>
java.lang.Object
com.github.benmanes.caffeine.jcache.event.JCacheEvictionListener<K,V>
- All Implemented Interfaces:
RemovalListener<K, Expirable<V>>
public final class JCacheEvictionListener<K,V>
extends Object
implements RemovalListener<K, Expirable<V>>
A listener that provides an adapter to publish events in the order of the actions being performed
on a key.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EventDispatcher<K, V> private final JCacheStatisticsMXBean -
Constructor Summary
ConstructorsConstructorDescriptionJCacheEvictionListener(EventDispatcher<K, V> dispatcher, JCacheStatisticsMXBean statistics) -
Method Summary
-
Field Details
-
statistics
-
dispatcher
-
cache
-
-
Constructor Details
-
JCacheEvictionListener
-
-
Method Details
-
setCache
-
onRemoval
Description copied from interface:RemovalListenerNotifies the listener that a removal occurred at some point in the past.This does not always signify that the key is now absent from the cache, as it may have already been re-added.
- Specified by:
onRemovalin interfaceRemovalListener<K,V> - Parameters:
key- the key represented by this entry, ornullif collectedexpirable- the value represented by this entry, ornullif collectedcause- the reason for which the entry was removed
-