Class Cache.Strong

All Implemented Interfaces:
Comparable<Delayed>, Runnable, Delayed
Enclosing class:
Cache<K,V>

private final class Cache.Strong extends DelayedRunnable.Immediate
Invoked from the a background thread after a weak or soft reference has been replaced by a strong one. It will looks for older strong references to replace by weak references so that the total cost stay below the cost limit.
  • Field Details

    • key

      private final K key
    • value

      private final V value
  • Constructor Details

    • Strong

      Strong(K key, V value)
  • Method Details

    • run

      public void run()
      Process to the replacement of eldest strong references by weak references. This method should be invoked from the background thread only.