|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<K,V>
A cache is similar to a map or a key value store, allowing to retrieve and update values which are associated to keys.
| Field Summary | |
|---|---|
static String |
CACHE_EXPIRY_DURATION
|
static String |
CACHE_EXPIRY_TYPE
|
static String |
CACHE_NAME
|
| Method Summary | |
|---|---|
void |
clear()
Clear the cache. |
boolean |
containsKey(K key)
Returns true, if there is a mapping for the specified key. |
V |
get(K key)
Returns a value associated by the given key, that contains a non expired value. |
String |
getName()
A configured or generated name of this cache instance. |
void |
put(K key,
V value)
Updates an existing cache entry for the specified key, so it associates the given value, or, insert a new cache entry for this key and value. |
void |
putAll(Map<K,V> keystores)
|
void |
remove(K key)
Removes the mapping for a key from the cache if it is present. |
| Field Detail |
|---|
static final String CACHE_NAME
static final String CACHE_EXPIRY_TYPE
static final String CACHE_EXPIRY_DURATION
| Method Detail |
|---|
String getName()
V get(K key)
null is returned.
key - key with which the specified value is associated
null if there was no mapping for the key.boolean containsKey(K key)
key - key which association should be checked
true, if this cache contains a mapping for the specified key
void put(K key,
V value)
key - key with which the specified value is associatedvalue - value to be associated with the specified keyvoid remove(K key)
key - key which mapping is to be removed from the cache, not nullvoid clear()
void putAll(Map<K,V> keystores)
keystores -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||