| org.apache.cocoon.caching.impl.CacheImpl org.apache.cocoon.caching.impl.EventAwareCacheImpl
EventAwareCacheImpl | public class EventAwareCacheImpl extends CacheImpl implements Initializable,EventAware(Code) | | This implementation holds all mappings between Events and PipelineCacheKeys
in two MultiHashMap to facilitate efficient lookup by either as Key.
author: Geoff Howard (ghoward@apache.org) version: $Id: EventAwareCacheImpl.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public void | clear() Clears the entire Cache, including all registered event-pipeline key
mappings.. | public void | dispose() | public void | initialize() Get the EventRegistry ready, and make sure it does not contain
orphaned Event/PipelineKey mappings. | public void | processEvent(Event e) Receive notification about the occurrence of an Event. | public void | remove(Serializable key) | public void | service(ServiceManager manager) | public void | store(Serializable key, CachedResponse response) When a new Pipeline key is stored, it needs to be have its
SourceValidity objects examined. | public void | veryifyEventCache() Ensure that all PipelineCacheKeys registered to events still
point to valid cache entries. |
clear | public void clear()(Code) | | Clears the entire Cache, including all registered event-pipeline key
mappings..
|
dispose | public void dispose()(Code) | | Release resources
|
initialize | public void initialize() throws Exception(Code) | | Get the EventRegistry ready, and make sure it does not contain
orphaned Event/PipelineKey mappings.
|
processEvent | public void processEvent(Event e)(Code) | | Receive notification about the occurrence of an Event.
If this event has registered pipeline keys, remove them
from the Store and unregister them
Parameters: e - The Event to be processed. |
remove | public void remove(Serializable key)(Code) | | Un-register this key in the EventRegistry in addition to
removing it from the Store
|
service | public void service(ServiceManager manager) throws ServiceException(Code) | | Look up the EventRegistry
|
store | public void store(Serializable key, CachedResponse response) throws ProcessingException(Code) | | When a new Pipeline key is stored, it needs to be have its
SourceValidity objects examined. For every
EventValidity found, its Event will be
registered with this key in the EventRegistry .
AggregatedValidity is handled recursively.
|
veryifyEventCache | public void veryifyEventCache()(Code) | | Ensure that all PipelineCacheKeys registered to events still
point to valid cache entries. Having an isTotallyEmpty() on
Store might make this less necessary, as the most likely time
to discover orphaned entries is at startup. This is because
stray events could hang around indefinitely if the cache is
removed abnormally or is not configured with persistence.
|
|
|