|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsecurity.cache.ehcache.EhCache
public class EhCache
JSecurity Cache implementation that wraps an Ehcache instance.
| Constructor Summary | |
|---|---|
EhCache(Cache cache)
Constructs a new EhCache instance with the given cache. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all elements in the cache, but leaves the cache in a useable state. |
Object |
get(Object key)
Gets a value of an element which matches the given key. |
long |
getDiskStoreSize()
Returns the size (in bytes) that this EhCache's disk store is consuming or -1 if
that number is unknown or cannot be calculated. |
long |
getMemoryStoreSize()
Returns the size (in bytes) that this EhCache's memory store is using (RAM), or -1 if
that number is unknown or cannot be calculated. |
long |
getMemoryUsage()
Returns the size (in bytes) that this EhCache is using in memory (RAM), or -1 if that
number is unknown or cannot be calculated. |
Set |
keys()
Returns a view of all the keys for entries contained in this cache. |
void |
put(Object key,
Object value)
Puts an object into the cache. |
void |
remove(Object key)
Removes the element which matches the key. |
int |
size()
Returns the number of entries in the cache. |
String |
toString()
Returns "EhCache [" + cache.getName() + "]" |
Set |
values()
Returns a view of all of the values contained in this cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EhCache(Cache cache)
cache - - delegate EhCache instance this JSecurity cache instance will wrap.| Method Detail |
|---|
public Object get(Object key)
throws CacheException
get in interface Cachekey - the key of the element to return.
CacheException - if there is a problem accessing the underlying cache system
public void put(Object key,
Object value)
throws CacheException
put in interface Cachekey - the key.value - the value.
CacheException - if there is a problem accessing the underlying cache system
public void remove(Object key)
throws CacheException
If no element matches, nothing is removed and no Exception is thrown.
remove in interface Cachekey - the key of the element to remove
CacheException - if there is a problem accessing the underlying cache system
public void clear()
throws CacheException
clear in interface CacheCacheException - if there is a problem accessing the underlying cache systempublic int size()
Cache
size in interface Cachepublic Set keys()
Cache
keys in interface Cachepublic Set values()
Cache
values in interface Cachepublic long getMemoryUsage()
-1 if that
number is unknown or cannot be calculated.
-1 if that
number is unknown or cannot be calculated.public long getMemoryStoreSize()
-1 if
that number is unknown or cannot be calculated.
-1 if
that number is unknown or cannot be calculated.public long getDiskStoreSize()
-1 if
that number is unknown or cannot be calculated.
-1 if
that number is unknown or cannot be calculated.public String toString()
toString in class Object
|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||