Class stl_LRU_Cache<K,​V>

java.lang.Object
com.jackmeng.stl.stl_LRU_Cache<K,​V>

public class stl_LRU_Cache<K,​V>
extends java.lang.Object
  • Field Details

  • Constructor Details

    • stl_LRU_Cache

      public stl_LRU_Cache​(int capacity, int numColors, int blockSize)
  • Method Details

    • get

      public V get​(K key)
    • put

      public void put​(K key, V value)
    • evict

      private void evict()
    • removeNode

      private void removeNode​(stl_LRU_Cache.Node<K,​V> node)
    • addToFront

      private void addToFront​(stl_LRU_Cache.Node<K,​V> node, int color)
    • getColor

      private int getColor​(K key)