Interface EvictionListener<K,V>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface EvictionListener<K,V>
A listener registered for notification when an entry is evicted. An instance may be called concurrently by multiple threads to process entries. An implementation should avoid performing blocking calls or synchronizing on shared resources.The listener is invoked by
ConcurrentLinkedHashMap
on a caller's thread and will not block other threads from operating on the map. An implementation should be aware that the caller's thread will not expect long execution times or failures as a side effect of the listener being notified. Execution safety and a fast turn around time can be achieved by performing the operation asynchronously, such as by submitting a task to anExecutorService
.- Author:
- [email protected] (Ben Manes)
- See Also:
- https://github.com/ben-manes/concurrentlinkedhashmap
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onEviction(K key, V value)
A call-back notification that the entry was evicted.
-