|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache<K,V>
Abstraction over cache providers
| Nested Class Summary | |
|---|---|
static class |
Cache.Type
|
| Method Summary | |
|---|---|
void |
clear()
Removes all the keys and their values from the Cache |
V |
get(K key)
Retrieves the value for the given Key |
java.lang.String |
getName()
Name of the cache node |
java.util.Set<K> |
keys()
Return all the keys |
V |
put(K key,
V value,
java.lang.Long ttl)
Associates the specified value with the specified key this cache. |
V |
remove(K key)
Removes the value for this key from a Cache. |
int |
size()
Size of the cache |
| Method Detail |
|---|
V get(K key)
key - key under which value is to be retrieved.
V put(K key,
V value,
java.lang.Long ttl)
key - key with which the specified value is to be associated.value - value to be associated with the specified key.ttl - the time for this entry to live
null if there was no mapping for key.
A null return can also indicate that the key previously associated null with the specified key,
if the implementation supports null values.V remove(K key)
null if the Key contained no mapping.
key - key whose mapping is to be removed
int size()
void clear()
java.lang.String getName()
java.util.Set<K> keys()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||