|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cache.DebuggingCacheProxy<K,V>
K - the type of keys maintained by this cacheV - the type of cached valuespublic final class DebuggingCacheProxy<K,V>
A debugging cache proxy.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary |
|---|
| Fields inherited from interface org.castor.cache.Cache |
|---|
DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE |
| Constructor Summary | |
|---|---|
DebuggingCacheProxy(Cache<K,V> cache)
Construct a DebugCacheProxy for given cache. |
|
| Method Summary | |
|---|---|
void |
clear()
|
void |
close()
Life-cycle method to allow custom resource cleanup for a cache implementation. |
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<K,V>> |
entrySet()
|
void |
expire(Object key)
Remove the mapping identified by key from the cache. |
void |
expireAll()
Removes all mappings from the cache. |
V |
get(Object key)
|
String |
getName()
Get virtual name of this cache. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public DebuggingCacheProxy(Cache<K,V> cache)
cache - The wrapped cache.| Method Detail |
|---|
public void initialize(Properties params)
throws CacheAcquireException
initialize in interface Cache<K,V>params - Parameters to initialize the cache (e.g. name, capacity).
CacheAcquireException - If cache can not be initialized.public void close()
close in interface Cache<K,V>public String getType()
getType in interface Cache<K,V>public String getName()
getName in interface Cache<K,V>public void expire(Object key)
expire in interface Cache<K,V>key - the key that needs to be removed.public void expireAll()
expireAll in interface Cache<K,V>public int size()
size in interface Map<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public V get(Object key)
get in interface Map<K,V>
public V put(K key,
V value)
put in interface Map<K,V>public V remove(Object key)
remove in interface Map<K,V>public void putAll(Map<? extends K,? extends V> map)
putAll in interface Map<K,V>public void clear()
clear in interface Map<K,V>public Set<K> keySet()
keySet in interface Map<K,V>public Collection<V> values()
values in interface Map<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||