K- type of the key
V- type of the value
public static interface CacheLIRS.EvictionCallback<K,V>
void evicted(@Nonnull K key, @Nullable V value, @Nonnull com.google.common.cache.RemovalCause cause)
Note: It is not safe to call any of
method from withing this callback. Any such call might result in
undefined behaviour and Java level deadlocks.
The method may be called twice for the same key (first if the entry is resident, and later if the entry is non-resident).
key- the evicted item's key
value- the evicted item's value or
cause- the cause of the eviction
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.