类 LRU2Cache<K,​V>

  • 所有已实现的接口:
    Serializable, Cloneable, Map<K,​V>

    public class LRU2Cache<K,​V>
    extends LinkedHashMap<K,​V>
    LRU-2

    When the data accessed for the first time, add it to history list. If the size of history list reaches max capacity, eliminate the earliest data (first in first out). When the data already exists in the history list, and be accessed for the second time, then it will be put into cache. TODO, consider replacing with ConcurrentHashMap to improve performance under concurrency
    另请参阅:
    序列化表格
    • 构造器详细资料

      • LRU2Cache

        public LRU2Cache()
      • LRU2Cache

        public LRU2Cache​(int maxCapacity)