|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.castor.cache.AbstractBaseCache<K,V>
K - the type of keys maintained by this cacheV - the type of cached valuespublic abstract class AbstractBaseCache<K,V>
Base implementation of all cache types.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.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 | |
|---|---|
AbstractBaseCache()
|
|
| Method Summary | |
|---|---|
void |
close()
Life-cycle method to allow custom resource cleanup for a cache implementation. |
void |
expire(java.lang.Object key)
Remove the mapping identified by key from the cache. |
void |
expireAll()
Removes all mappings from the cache. |
java.lang.String |
getName()
Get virtual name of this cache. |
void |
initialize(java.util.Properties params)
Lyfe-cycle method to allow custom initialization of cache implementations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.castor.cache.Cache |
|---|
getType |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Constructor Detail |
|---|
public AbstractBaseCache()
| Method Detail |
|---|
public void initialize(java.util.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 final java.lang.String getName()
getName in interface Cache<K,V>public final void expire(java.lang.Object key)
expire in interface Cache<K,V>key - the key that needs to be removed.public final void expireAll()
expireAll in interface Cache<K,V>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||