|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Cache
Interface defining a standard basic cache. Implementors may encapsulate
existing Cache providers (EHCache, JBossTree, ...). Join Caches restrict
keys and elements to be Serializable : this should help if wanting
to have clustered and distributed caches.
Serializable| Method Summary | |
|---|---|
void |
cleanUp()
Remove all elements from this cache and the cache itself. |
void |
clear()
Remove all elements from this cache but leave it in a usable state |
java.io.Serializable |
get(java.io.Serializable key)
Get the value of a cache element which matches the key |
java.util.List |
getElements()
Get all the elements of this cache. |
java.lang.String |
getKey()
Get the key this cache is registred within CacheManager |
void |
put(java.io.Serializable key,
java.io.Serializable value)
Puts an object into the cache |
void |
remove(java.io.Serializable key)
Remove an object from the cache |
| Method Detail |
|---|
java.lang.String getKey()
java.util.List getElements()
java.io.Serializable get(java.io.Serializable key)
key - The key of the element to return
void put(java.io.Serializable key,
java.io.Serializable value)
throws CacheException
key - a serializable keyvalue - a serializable value
CacheException - if object cannot be put into cache
void remove(java.io.Serializable key)
throws CacheException
key - a serializable key
CacheException - if something went wrong during removal
void clear()
throws CacheException
CacheException - if cache cannot be cleared
void cleanUp()
throws CacheException
CacheManager should no longer offer
access to this cache until explicit cache re-creation.
CacheException - if cache cannot be cleaned up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||