K - the Key typeV - the Value typepublic class SelfExpiringHashMap<K,V> extends Object implements SelfExpiringMap<K,V>
| Constructor and Description |
|---|
SelfExpiringHashMap()
Deprecated.
use a constructor that specifies a timeout or don't use this class
|
SelfExpiringHashMap(long defaultMaxLifeTimeMillis) |
SelfExpiringHashMap(long defaultMaxLifeTimeMillis,
int initialCapacity) |
SelfExpiringHashMap(long defaultMaxLifeTimeMillis,
int initialCapacity,
float loadFactor) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet()
Not supported.
|
V |
get(Object key) |
boolean |
isEmpty() |
Set<K> |
keySet()
Originally threw UnsupportedOperationException.
|
V |
put(K key,
V value) |
V |
put(K key,
V value,
long lifeTimeMillis)
Associates the given key to the given value in this map, with the specified life times in milliseconds.
|
void |
putAll(Map<? extends K,? extends V> m)
Not supported.
|
V |
remove(Object key) |
boolean |
renewKey(K key)
Renews the specified key, setting the life time to the initial value.
|
int |
size() |
String |
toString() |
Collection<V> |
values()
Originally threw UnsupportedOperationException.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll@Deprecated public SelfExpiringHashMap()
public SelfExpiringHashMap(long defaultMaxLifeTimeMillis)
public SelfExpiringHashMap(long defaultMaxLifeTimeMillis,
int initialCapacity)
public SelfExpiringHashMap(long defaultMaxLifeTimeMillis,
int initialCapacity,
float loadFactor)
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public V put(K key, V value, long lifeTimeMillis)
put in interface SelfExpiringMap<K,V>public boolean renewKey(K key)
renewKey in interface SelfExpiringMap<K,V>public Collection<V> values()
Copyright © 2016. All rights reserved.