|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.figure8.join.services.cache.EhCache
public class EhCache
Implementation of CacheManager using EHCache provider
(see http://ehcache.sourceforge.net). It encapsulates a EH Cache.
| Constructor Summary | |
|---|---|
EhCache(java.lang.String key,
net.sf.ehcache.Cache ehcache,
net.sf.ehcache.CacheManager ehcacheManager)
Create a new instance of EhCache, wrapping a EH cache object. |
|
| 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 |
net.sf.ehcache.Cache |
getWrappedCache()
|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EhCache(java.lang.String key,
net.sf.ehcache.Cache ehcache,
net.sf.ehcache.CacheManager ehcacheManager)
key - The cache nameehcache - The encapsulated EH cache| Method Detail |
|---|
public net.sf.ehcache.Cache getWrappedCache()
public java.lang.String getKey()
getKey in interface Cachepublic java.util.List getElements()
getElements in interface Cachepublic java.io.Serializable get(java.io.Serializable key)
get in interface Cachekey - The key of the element to return
public void put(java.io.Serializable key,
java.io.Serializable value)
throws CacheException
put in interface Cachekey - a serializable keyvalue - a serializable value
CacheException - if object cannot be put into cache
public void remove(java.io.Serializable key)
throws CacheException
remove in interface Cachekey - a serializable key
CacheException - if something went wrong during removal
public void clear()
throws CacheException
clear in interface CacheCacheException - if cache cannot be cleared
public void cleanUp()
throws CacheException
CacheManager should no longer offer
access to this cache until explicit cache re-creation.
cleanUp in interface CacheCacheException - if cache cannot be cleaned up
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||