public final class JCacheEvictionListener<K,V> extends Object implements CacheWriter<K,Expirable<V>>
CacheWriter that provides an adapter to publish events in the order of the
actions being performed on a key.| Constructor and Description |
|---|
JCacheEvictionListener(EventDispatcher<K,V> dispatcher,
JCacheStatisticsMXBean statistics) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(K key,
@Nullable Expirable<V> expirable,
RemovalCause cause) |
void |
setCache(Cache<K,V> cache)
Sets the cache instance that was created with this listener.
|
void |
write(K key,
Expirable<V> value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisabledWriterpublic JCacheEvictionListener(EventDispatcher<K,V> dispatcher, JCacheStatisticsMXBean statistics)
public void setCache(Cache<K,V> cache)
cache - the cache that uses this loaderpublic void write(K key, Expirable<V> value)
write in interface CacheWriter<K,Expirable<V>>public void delete(K key, @Nullable Expirable<V> expirable, RemovalCause cause)
delete in interface CacheWriter<K,Expirable<V>>