Class LRUMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.jppf.utils.collections.LRUMap<K,V>
Type Parameters:
K - the type fo the keys.
V - the type fo the values.
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class LRUMap<K,V> extends LinkedHashMap<K,V>
A cache with an LRU eviction policy.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • LRUMap

      public LRUMap()
      Initialize this cache with a default max capacity of 1024.
    • LRUMap

      public LRUMap(int maxCapacity)
      Initialize this cache with the specified max capacity.
      Parameters:
      maxCapacity - the maximum capacity of this cache.
  • Method Details