Type Parameters:
K - type of keys in this cache
V - type of values in this cache
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>, SequencedMap<K,V>

public class LHMCache<K,V>extends LinkedHashMap<K,V>
A LinkedHashMap with a maximum size, for use as an LRU cache. Unsynchronized.
See Also:
  • Constructor Details

    • LHMCache

      public LHMCache(int max)
      Bounded cache with LRU eviction.
      Parameters:
      max - maximum entries before oldest are evicted
  • Method Details