Class AccessBasedLRUCache<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.eclipse.emf.compare.match.eobject.internal.AccessBasedLRUCache<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class AccessBasedLRUCache<K,V> extends LinkedHashMap<K,V>
A Map acting like a LRU cache which will evict elements which have not been accessed in a while.
See Also:
  • Constructor Details

    • AccessBasedLRUCache

      public AccessBasedLRUCache(int maxSize, int initialCapacity, float loadFactor)
      Create a new cache.
      Parameters:
      maxSize - the maximum size of the cache before it starts evicting elements.
      initialCapacity - pre-allocated capacity for the cache.
      loadFactor - the load factor
  • Method Details