Package io.grpc.rls

Interface LruCache.EvictionListener<K,V>

All Known Implementing Classes:
CachingRlsLbClient.AutoCleaningEvictionListener, LinkedHashLruCache.SizeHandlingEvictionListener
Enclosing interface:
LruCache<K,V>

public static interface LruCache.EvictionListener<K,V>
A Listener notifies cache eviction events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEviction(K key, V value, LruCache.EvictionType cause)
    Notifies the listener when any cache entry is evicted.
  • Method Details

    • onEviction

      void onEviction(K key, V value, LruCache.EvictionType cause)
      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 to Executor.