Package io.grpc.rls
Class LinkedHashLruCache.SizeHandlingEvictionListener
java.lang.Object
io.grpc.rls.LinkedHashLruCache.SizeHandlingEvictionListener
- All Implemented Interfaces:
LruCache.EvictionListener<K,
LinkedHashLruCache<K, V>.SizedValue>
- Enclosing class:
LinkedHashLruCache<K,
V>
private final class LinkedHashLruCache.SizeHandlingEvictionListener
extends Object
implements LruCache.EvictionListener<K,LinkedHashLruCache<K,V>.SizedValue>
A
LruCache.EvictionListener
keeps track of size.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onEviction
(K key, LinkedHashLruCache<K, V>.SizedValue value, LruCache.EvictionType cause) Notifies the listener when any cache entry is evicted.
-
Field Details
-
delegate
-
-
Constructor Details
-
SizeHandlingEvictionListener
SizeHandlingEvictionListener(@Nullable LruCache.EvictionListener<K, V> delegate)
-
-
Method Details
-
onEviction
public void onEviction(K key, LinkedHashLruCache<K, V>.SizedValue value, LruCache.EvictionType cause) Description copied from interface:LruCache.EvictionListener
Notifies the listener when any cache entry is evicted. Implementation can assume that this method is called serially. Implementation should be non blocking, for long running task consider offloading the task toExecutor
.- Specified by:
onEviction
in interfaceLruCache.EvictionListener<K,
LinkedHashLruCache<K, V>.SizedValue>
-