K - 键类型V - 值类型public class TimedCache<K,V> extends StampedCache<K,V>
lockcacheMap, capacity, existCustomTimeout, hitCount, keyLockMap, listener, missCount, timeout| 构造器和说明 |
|---|
TimedCache(long timeout)
构造
|
TimedCache(long timeout,
Map<Mutable<K>,CacheObj<K,V>> map)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancelPruneSchedule()
取消定时清理
|
protected int |
pruneCache()
清理过期对象
|
void |
schedulePrune(long delay)
定时清理
|
cacheObjIterator, clear, containsKey, get, prune, put, removecacheObjIter, capacity, get, getHitCount, getMissCount, getWithoutLock, isEmpty, isFull, isPruneExpiredActive, iterator, keySet, onRemove, put, putWithoutLock, removeWithoutLock, setListener, size, timeout, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected int pruneCache()
pruneCache 在类中 AbstractCache<K,V>public void schedulePrune(long delay)
delay - 间隔时长,单位毫秒public void cancelPruneSchedule()
Copyright © 2023. All rights reserved.