K
- 键V
- 值public class WeakCache<K,V> extends TimedCache<K,V>
lock
cacheMap, capacity, existCustomTimeout, hitCount, keyLockMap, listener, missCount, timeout
Constructor and Description |
---|
WeakCache(long timeout)
构造
|
Modifier and Type | Method and Description |
---|---|
WeakCache<K,V> |
setListener(CacheListener<K,V> listener)
设置监听
|
cancelPruneSchedule, pruneCache, schedulePrune
cacheObjIterator, clear, containsKey, get, prune, put, remove
cacheObjIter, capacity, get, get, getHitCount, getMissCount, getWithoutLock, isEmpty, isFull, isPruneExpiredActive, iterator, keySet, onRemove, put, putWithoutLock, removeWithoutLock, size, timeout, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public WeakCache(long timeout)
timeout
- 超时时常,单位毫秒,-1或0表示无限制public WeakCache<K,V> setListener(CacheListener<K,V> listener)
AbstractCache
setListener
in interface Cache<K,V>
setListener
in class AbstractCache<K,V>
listener
- 监听Copyright © 2024. All rights reserved.