public class CacheMap<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<K,CacheItem<V>> |
cache |
protected long |
cleanupIntervalNanos |
protected java.util.concurrent.atomic.AtomicLong |
cleanupTimeNanos |
| Constructor and Description |
|---|
CacheMap() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanUp() |
void |
clear() |
V |
get(K key) |
V |
get(K key,
V defaultItemValue,
long itemExpirationNano) |
java.util.Map<K,V> |
getEntries() |
void |
put(K key,
V item,
long itemExpirationNano) |
void |
putIfAbsent(K key,
V item,
long itemExpirationNano) |
void |
remove(K key) |
int |
size() |
protected final long cleanupIntervalNanos
protected final java.util.concurrent.atomic.AtomicLong cleanupTimeNanos
public void remove(K key)
public void clear()
public int size()
protected void cleanUp()