public class TimeReferenceCache<K,V> extends ACache<K,V>
private HashMap<K,SoftReference<Tuple.Pair<Long,V>>>
cache
private int
timeout
TimeReferenceCache(int timeout)
Optional<V>
get(K key)
(专用程序包) Map<K,?>
getCache()
void
put(K key, V value)
clear, get, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private final HashMap<K,SoftReference<Tuple.Pair<Long,V>>> cache
private int timeout
public TimeReferenceCache(int timeout)
timeout,单位毫秒
Map<K,?> getCache()
getCache
ACache<K,V>
public void put(K key, V value)
ICache
public Optional<V> get(K key)
Copyright © 2019. All rights reserved.