public static class FlatTextRender.TLRUCache extends xyz.cofe.collection.map.LRUCache<String,FlatBlock>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
protected WeakHashMap<String,Long> |
cachedTime |
protected long |
lifetimeLimit |
| Constructor and Description |
|---|
TLRUCache(int cacheSizeMax,
long lifetimeLimit)
Конструктор
|
| Modifier and Type | Method and Description |
|---|---|
FlatBlock |
get(Object key) |
long |
getLifetimeLimit()
Возвращает макс время (мс) жизни записи в кэше
|
FlatBlock |
put(String key,
FlatBlock value) |
void |
setLifetimeLimit(long lifetimeLimit)
Указывает макс время (мс) жизни записи в кэше
|
getCacheSizeMax, removeEldestEntry, setCacheSizeMaxclear, containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeprotected long lifetimeLimit
protected final WeakHashMap<String,Long> cachedTime
public TLRUCache(int cacheSizeMax,
long lifetimeLimit)
cacheSizeMax - максимальное кол-во записейlifetimeLimit - макс время (мс) жизни записи в кэшеpublic long getLifetimeLimit()
public void setLifetimeLimit(long lifetimeLimit)
lifetimeLimit - макс время (мс) жизни записиCopyright © 2019. All rights reserved.