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>
Direct Known Subclasses:
EstablishmentManager.InboundTokens, UDPTransport.DestroyedCache

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

    • _max

      private final int _max
      Maximum number of entries.
  • Constructor Details

    • LHMCache

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