| org.apache.cocoon.caching.impl.AbstractDoubleMapEventRegistry
All known Subclasses: org.apache.cocoon.caching.impl.DefaultEventRegistryImpl, org.apache.cocoon.caching.impl.StoreEventRegistryImpl,
AbstractDoubleMapEventRegistry | abstract public class AbstractDoubleMapEventRegistry extends AbstractLogEnabled implements Initializable,EventRegistry,Disposable,ThreadSafe(Code) | | This abstract base implementation of EventRegistry stores
the event-key mappings in a simple pair of MultiMap s. It
leaves all persistence to its concrete subclasses. To protect against
future confusing inheritance trees, all internal implementation of the
event-key mapping mechanism is hidden from its subclasses. If future
EventRegistry implementations desire to use a different event-key mapping
strategy but share persistence code, this package should probably be
refactored to employ composition rather than inheritance. For now,
simplicity favors inheritance.
since: 2.1 author: Geoff Howard version: CVS $Id: AbstractDoubleMapEventRegistry.java 598490 2007-11-27 01:56:14Z joerg $ |
clear | public void clear()(Code) | | Remove all registered data.
|
createBlankCache | final protected void createBlankCache()(Code) | | |
dispose | public void dispose()(Code) | | Delegate persistence to subclasses then clean up resources.
|
initialize | public void initialize() throws Exception(Code) | | Recover state by de-serializing the data wrapper. If this fails
a new empty mapping is initialized and the Cache is signalled of
the failure so it can clean up.
|
recover | abstract protected boolean recover()(Code) | | An EventRegistry must recover its persisted data. Failed
recovery must be signaled so that the Cache will know not to
serve potentially stale content. Of course, at first start up
failed recovery is a normal state.
boolean to signal success or failure of recovery. |
register | public void register(Event e, Serializable key)(Code) | | Registers (stores) a two-way mapping between this Event and this
PipelineCacheKey for later retrieval.
Parameters: e - The event to Parameters: key - key |
removeKey | public void removeKey(Serializable key)(Code) | | When a CachedResponse is removed from the Cache, any entries
in the event mapping must be cleaned up.
|
wasRecoverySuccessful | public boolean wasRecoverySuccessful()(Code) | | true if persistent state existed and was recovered successfully. |
|
|