public class EruptCacheLRU<V> extends LinkedHashMap<String,EruptCacheLRU.ExpireNode<V>> implements EruptCache<V>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
EruptCacheLRU.ExpireNode<V>
过期时间节点
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
EruptCacheLRU(int capacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
clean()
清理已过期的数据
|
void |
delete(String key) |
V |
get(String key) |
V |
put(String key,
V v,
long ttl) |
protected boolean |
removeEldestEntry(Map.Entry<String,EruptCacheLRU.ExpireNode<V>> eldest) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringgetAndSetcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic V get(String key)
get 在接口中 EruptCache<V>public void delete(String key)
protected boolean removeEldestEntry(Map.Entry<String,EruptCacheLRU.ExpireNode<V>> eldest)
protected void clean()
Copyright © 2023. All rights reserved.