K - the type parameterV - the type parameterpublic class SimpleCache<K,V> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleCache()
Instantiates a new Simple cache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear void.
|
V |
get(K key)
Get v.
|
boolean |
hasKey(K key)
Has key.
|
boolean |
isAvailable(K key)
Is available.
|
boolean |
isExpired(K key)
Is expired.
|
static <K,V> SimpleCache<K,V> |
newInstance()
New instance.
|
void |
put(K key,
V value)
Put void.
|
void |
putWithTimeout(K key,
V value,
Timeout t)
Put with timeout.
|
void |
refresh(K key)
Refresh void.
|
void |
remove(K key)
Remove void.
|
public static <K,V> SimpleCache<K,V> newInstance()
K - the type parameterV - the type parameterpublic void putWithTimeout(K key, V value, Timeout t)
key - the keyvalue - the valuet - the tpublic boolean hasKey(K key)
key - the keypublic void remove(K key)
key - the keypublic void clear()
public boolean isAvailable(K key)
key - the keypublic boolean isExpired(K key)
key - the keypublic void refresh(K key)
key - the keyCopyright © 2014 Boleslav Bobcik - Auderis. All rights reserved.