Package org.castor.cache
Class DebuggingCacheProxy
java.lang.Object
org.castor.cache.DebuggingCacheProxy
A debugging cache proxy.
- Since:
- 1.0
- Version:
- $Revision: 8102 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ralf Joachim
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.castor.cache.Cache
DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionDebuggingCacheProxy
(Cache cache) Construct a DebugCacheProxy for given cache. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
close()
Life-cycle method to allow custom resource cleanup for a cache implementation.boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
void
Remove the mapping identified by key from the cache.void
Removes all mappings from the cache.getName()
Get virtual name of this cache.getType()
Indicates the type of this cache.void
initialize
(Properties params) Lyfe-cycle method to allow custom initialization of cache implementations.boolean
isEmpty()
keySet()
void
int
size()
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
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
DebuggingCacheProxy
Construct a DebugCacheProxy for given cache.- Parameters:
cache
- The wrapped cache.
-
-
Method Details
-
initialize
Lyfe-cycle method to allow custom initialization of cache implementations.- Specified by:
initialize
in interfaceCache
- Parameters:
params
- Parameters to initialize the cache (e.g. name, capacity).- Throws:
CacheAcquireException
- If cache can not be initialized.
-
close
public void close()Life-cycle method to allow custom resource cleanup for a cache implementation. -
getType
Indicates the type of this cache. -
getName
Get virtual name of this cache. Castor sets the cache name to the class name of the objects stored in the cache. -
expire
Remove the mapping identified by key from the cache. -
expireAll
public void expireAll()Removes all mappings from the cache. -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<Object,
Object>
-
containsValue
- Specified by:
containsValue
in interfaceMap<Object,
Object>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-