|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.sape.carbon.services.cache.total.AbstractTotalCache
|
+--org.sape.carbon.services.cache.total.WritableCache
The Total Cache implementation of the Cache interface is intended for access to data which expires periodically as a whole or which can be changed on the fly by clients.
This implementation uses a synchronized map to store all data. This means that all gets and puts are synchronized to ensure consistent results
Copyright 2002 Sapient
| Field Summary | |
private Map |
activeMap
Map of the cached values. |
private TotalCacheDataLoader |
dataLoader
Holds the dataloader for this cache. |
private org.apache.commons.logging.Log |
log
The handle to Apache-commons logger |
| Constructor Summary | |
WritableCache()
|
|
| Method Summary | |
void |
configure(ComponentConfiguration configuration)
Configure the component. |
protected Map |
getCacheMap()
Returns a referench to the Map that contains all the cached data. |
void |
initialize(Component thisComponent)
Initialize the component. |
void |
refreshAll()
Refresh the contents of the cache. |
| Methods inherited from class org.sape.carbon.services.cache.total.AbstractTotalCache |
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, resume, runScheduledTask, size, start, stop, suspend, 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 |
| Field Detail |
private org.apache.commons.logging.Log log
private Map activeMap
private TotalCacheDataLoader dataLoader
| Constructor Detail |
public WritableCache()
| Method Detail |
public void refreshAll()
throws CacheLoadException
refreshAll in interface CacherefreshAll in class AbstractTotalCacheCacheLoadException - when its data loader has failed to load datapublic void configure(ComponentConfiguration configuration)
Configurable
configure in interface Configurableconfiguration - the configuration for this componentConfigurable.configure(ComponentConfiguration)
public void initialize(Component thisComponent)
throws Exception
Initializable
initialize in interface InitializablethisComponent - the reference to the component that this object
is a part of. Store this referece within your Functional Implementation
for future use.
Exception - when there is a failure to initialize the componentInitializable.initialize(org.sape.carbon.core.component.Component)protected Map getCacheMap()
AbstractTotalCache
getCacheMap in class AbstractTotalCacheAbstractTotalCache.getCacheMap()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||