Class BoundedCache<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
com.schibsted.spt.data.jslt.impl.BoundedCache<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>, SequencedMap<K,V>

public class BoundedCache<K,V> extends LinkedHashMap<K,V>
A Map implementation that deletes the oldest entry once the size goes over a preset limit. This prevents the Map from growing without bounds.
See Also:
  • Field Details

    • maxSize

      private int maxSize
  • Constructor Details

    • BoundedCache

      public BoundedCache(int maxSize)
  • Method Details