|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cache.AbstractBaseCache<K,V>
org.castor.cache.distributed.AbstractDistributedCache<K,V>
org.castor.cache.distributed.OsCache<K,V>
K - the type of keys maintained by this cacheV - the type of cached valuespublic final class OsCache<K,V>
OSCache (opensymphony) implementation of Castor JDO Cache. For more details of OSCache, see http://www.opensymphony.com/oscache
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static String |
IMPLEMENTATION
The classname of the implementations cache class. |
static String |
NEEDS_REFRESH_EXCEPTION
Classname of exception thrown by getFromCache() method of oscache. |
static String |
TYPE
The type of the cache. |
| Fields inherited from interface org.castor.cache.Cache |
|---|
DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE |
| Constructor Summary | |
|---|---|
OsCache(Object cache)
Construct an instance of OsCache that wrapps access to given cache implementation of class com.opensymphony.oscache.general.GeneralCacheAdministrator. |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<K,V>> |
entrySet()
|
V |
get(Object key)
|
String |
getType()
Indicates the type of this cache. |
void |
initialize(Properties params)
Lyfe-cycle method to allow custom initialization of cache implementations. |
boolean |
isEmpty()
|
Set<K> |
keySet()
|
V |
put(K key,
V value)
|
void |
putAll(Map<? extends K,? extends V> map)
|
V |
remove(Object key)
|
int |
size()
|
Collection<V> |
values()
|
| Methods inherited from class org.castor.cache.distributed.AbstractDistributedCache |
|---|
getCache, invokeMethod, invokeStaticMethod, setCache |
| Methods inherited from class org.castor.cache.AbstractBaseCache |
|---|
close, expire, expireAll, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final String TYPE
public static final String IMPLEMENTATION
public static final String NEEDS_REFRESH_EXCEPTION
| Constructor Detail |
|---|
public OsCache(Object cache)
com.opensymphony.oscache.general.GeneralCacheAdministrator.
cache - The cache to be wrapped.| Method Detail |
|---|
public void initialize(Properties params)
throws CacheAcquireException
initialize in interface Cache<K,V>initialize in class AbstractBaseCache<K,V>params - Parameters to initialize the cache (e.g. name, capacity).
CacheAcquireException - If cache can not be initialized.public String getType()
public int size()
size in interface Map<K,V>size in class AbstractDistributedCache<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>isEmpty in class AbstractDistributedCache<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in class AbstractDistributedCache<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in class AbstractDistributedCache<K,V>public V get(Object key)
get in interface Map<K,V>get in class AbstractDistributedCache<K,V>
public V put(K key,
V value)
put in interface Map<K,V>put in class AbstractDistributedCache<K,V>public V remove(Object key)
remove in interface Map<K,V>remove in class AbstractDistributedCache<K,V>public void putAll(Map<? extends K,? extends V> map)
putAll in interface Map<K,V>putAll in class AbstractDistributedCache<K,V>public void clear()
clear in interface Map<K,V>clear in class AbstractDistributedCache<K,V>public Set<K> keySet()
keySet in interface Map<K,V>keySet in class AbstractDistributedCache<K,V>public Collection<V> values()
values in interface Map<K,V>values in class AbstractDistributedCache<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>entrySet in class AbstractDistributedCache<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||