程序包 com.jackmeng
类 NaiveLRUCache<K,V>
java.lang.Object
com.jackmeng.NaiveLRUCache<K,V>
-
嵌套类概要
-
字段概要
修饰符和类型字段说明private final int
private final NaiveLRUCache.Node<K,
V>[][] private final Map<K,
NaiveLRUCache.Node<K, V>> private final int
private final NaiveLRUCache.Node<K,
V> -
构造器概要
-
方法概要
修饰符和类型方法说明void
addToFront
(NaiveLRUCache.Node<K, V> node, int color) private void
evict()
int
void
private void
removeNode
(NaiveLRUCache.Node<K, V> node)
-
字段详细资料
-
capacity
private final int capacity -
map
-
tail
-
numColors
private final int numColors -
colorBlocks
-
-
构造器详细资料
-
NaiveLRUCache
public NaiveLRUCache(int capacity, int numColors, int blockSize)
-
-
方法详细资料
-
get
-
removeNode
-
addToFront
-
getColor
-
put
-
evict
private void evict()
-