|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Smart map-like objects that store key/value pairs on behalf of callers, with user-defined expiration policies.
It can be tied to an external source with a
CacheDataSource to automatically read in values. It can
be cluster-aware if it includes a BroadcastingStrategy.
CacheFactory,
CacheStrategy,
CacheDataSource| Method Summary | |
Object |
get(Object key)
Returns the value associated with key in this
cache. |
Object |
get(Object key,
Map properties)
Returns the value associated with key in this
cache. |
Map |
getAll(Collection keys)
Returns the values associated with keys in this
cache. |
Map |
getAll(Collection keys,
Map properties)
Returns the values associated with keys in this
cache. |
String |
getName()
Returns the name of this cache. |
void |
invalidate(Object key)
Removes the association for key and its value from
this cache. |
void |
invalidateAll()
Removes all associations for all keys and their values from this cache. |
void |
invalidateAll(Collection keys)
Removes all associations for keys and their values
from this cache. |
void |
put(Object key,
Object value)
Adds an association between key and value
into this cache. |
void |
put(Object key,
Object value,
Map properties)
Adds an association between key and value
into this cache. |
void |
putAll(Map keyValuePairs)
Adds an association for each entry in keyValuePairs
into this cache. |
void |
putAll(Map keyValuePairs,
Map properties)
Adds an association for each entry in keyValuePairs
into this cache. |
| Method Detail |
public String getName()
Returns the name of this cache.
public Object get(Object key)
throws CacheException
Returns the value associated with key in this
cache.
If the value is not in this cache and this cache has a
CacheDataSource, this cache will call the
load method on it to fetch the value
and then insert the new value into itself using the
put method.
Same as get(key, null).
key - locator for the value to retrievekey, or null if none
public Object get(Object key,
Map properties)
throws CacheException
Returns the value associated with key in this
cache.
If the value is not in this cache and this cache has a
CacheDataSource, this cache will call the
load method on it to fetch the value
and then insert the new value into itself using the
put method.
key - locator for the value to retrieveproperties - possible overrides for the strategies, can be nullkey, or null if none
public Map getAll(Collection keys)
throws CacheException
Returns the values associated with keys in this
cache.
If some values are not in this cache and this cache has a
CacheDataSource, this cache will call the
loadAll method on it to fetch the
missing values and then insert them into itself using the
putAll method.
Same as getAll(keys, null).
keys - locators for the value to retrieve
public Map getAll(Collection keys,
Map properties)
throws CacheException
Returns the values associated with keys in this
cache.
If some values are not in this cache and this cache has a
CacheDataSource, this cache will call the
loadAll methods on it to fetch the
missing values and then insert them into itself using the
putAll method.
keys - locators for the value to retrieveproperties - possible overrides for the strategies, can be null
public void put(Object key,
Object value)
throws CacheException
Adds an association between key and value
into this cache.
Same as put(key, value, null).
key - locator for the value to insertvalue - value to insert
public void put(Object key,
Object value,
Map properties)
throws CacheException
Adds an association between key and value
into this cache.
key - locator for the value to insertvalue - value to insertproperties - possible overrides for the strategies, can be null
public void putAll(Map keyValuePairs)
throws CacheException
Adds an association for each entry in keyValuePairs
into this cache.
Same as putAll(keyValuePairs, null).
keyValuePairs - key/value pairs to insert
public void putAll(Map keyValuePairs,
Map properties)
throws CacheException
Adds an association for each entry in keyValuePairs
into this cache.
keyValuePairs - key/value pairs to insertproperties - possible overrides for the strategies, can be null
public void invalidate(Object key)
throws CacheException
Removes the association for key and its value from
this cache.
key - locator for the value to remove
public void invalidateAll(Collection keys)
throws CacheException
Removes all associations for keys and their values
from this cache.
keys - locators for the values to remove
public void invalidateAll()
throws CacheException
Removes all associations for all keys and their values from this cache.
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||