|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsecurity.cache.HashtableCache
public class HashtableCache
An implementation of the JSecurity Cache interface that uses a
Hashtable to store cached objects. This implementation is only suitable for
development/testing use. A more robust caching solution should be used for production
systems such as the EhCacheManager
| Constructor Summary | |
|---|---|
HashtableCache(String name)
Creates a new cache with the given name. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear all entries from the cache. |
Object |
get(Object 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. |
void |
put(Object key,
Object value)
Adds a Cache entry. |
Object |
read(Object key)
|
void |
remove(Object key)
Remove the cache entry corresponding to the specified key. |
int |
size()
Returns the number of entries in the cache. |
String |
toString()
|
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 HashtableCache(String name)
name - the name of this cache.| Method Detail |
|---|
public Object read(Object key)
throws CacheException
CacheException
public Object get(Object key)
throws CacheException
Cachekey or
null if there is no Cache entry for that key.
get in interface Cachekey - the key that the value was previous added with
key
CacheException - if there is a problem accessing the underlying cache system
public void put(Object key,
Object value)
throws CacheException
Cache
put in interface Cachekey - the key used to identify the object being stored.value - the value to be stored in the cache.
CacheException - if there is a problem accessing the underlying cache system
public void remove(Object key)
throws CacheException
Cache
remove in interface Cachekey - the key of the entry to be removed.
CacheException - if there is a problem accessing the underlying cache system
public void clear()
throws CacheException
Cache
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 String toString()
toString in class Object
|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||