K
- 键类型V
- 值类型public class LFUCache<K,V> extends StampedCache<K,V>
lock
cacheMap, capacity, existCustomTimeout, hitCount, keyLockMap, listener, missCount, timeout
Constructor and Description |
---|
LFUCache(int capacity)
构造
|
LFUCache(int capacity,
long timeout)
构造
|
Modifier and Type | Method and Description |
---|---|
protected int |
pruneCache()
清理过期对象。
|
cacheObjIterator, clear, containsKey, get, prune, put, remove
cacheObjIter, capacity, get, get, getHitCount, getMissCount, getWithoutLock, isEmpty, isFull, isPruneExpiredActive, iterator, keySet, onRemove, put, putWithoutLock, removeWithoutLock, setListener, size, timeout, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public LFUCache(int capacity)
capacity
- 容量public LFUCache(int capacity, long timeout)
capacity
- 容量timeout
- 过期时长protected int pruneCache()
pruneCache
in class AbstractCache<K,V>
Copyright © 2024. All rights reserved.