| Constructor and Description |
|---|
MapCache(String
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all entries from the cache.
|
V |
get(K key)
Returns the Cached value stored under the specified
key or
null if there is no Cache entry for that
key.
|
Set |
keys()
Returns a view of all the keys for entries contained in this cache.
|
V |
put(K key, V value)
Adds a Cache entry.
|
V |
remove(K key)
Remove the cache entry corresponding to the specified key.
|
int |
size()
Returns the number of entries in the cache.
|
String |
toString()
|
Collection |
values()
Returns a view of all of the values contained in this cache.
|
public V get(K key) throws CacheException
Cache
key or
null if there is no Cache entry for that
key.
get in interface
Cache<K,V>
key - the key that the value was previous added with
null if there is no entry for the specified
key
CacheException - if there is a problem accessing the underlying cache system
public V put(K key, V value) throws CacheException
Cache
put in interface
Cache<K,V>
key - the key used to identify the object being stored.
value - the value to be stored in the cache.
key or
null if there was previous value
CacheException - if there is a problem accessing the underlying cache system
public V remove(K key) throws CacheException
Cache
remove in interface
Cache<K,V>
key - the key of the entry to be removed.
key or
null if there was previous value
CacheException - if there is a problem accessing the underlying cache system
public void clear()
throws CacheException
Cache
clear in interface
Cache<K,V>
CacheException - if there is a problem accessing the underlying cache system
public int size()
Cache
public Set<K> keys()
Cache
public Collection<V> values()
Cache
public StringtoString()