Package com.google.common.cache
Class RemovalListeners
java.lang.Object
com.google.common.cache.RemovalListeners
A collection of common removal listeners.
- Since:
- 10.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> RemovalListener <K, V> asynchronous
(RemovalListener<K, V> listener, Executor executor) Returns aRemovalListener
which processes all eviction notifications usingexecutor
.
-
Constructor Details
-
RemovalListeners
private RemovalListeners()
-
-
Method Details
-
asynchronous
public static <K,V> RemovalListener<K,V> asynchronous(RemovalListener<K, V> listener, Executor executor) Returns aRemovalListener
which processes all eviction notifications usingexecutor
.- Parameters:
listener
- the backing listenerexecutor
- the executor with which removal notifications are asynchronously executed
-