| org.apache.cocoon.caching.EventRegistry
All known Subclasses: org.apache.cocoon.caching.impl.DefaultEventRegistryImpl, org.apache.cocoon.caching.impl.AbstractDoubleMapEventRegistry,
EventRegistry | public interface EventRegistry extends Component(Code) | | The EventRegistry is responsible for the two-way many-to-many
mapping between cache Event s and
PipelineCacheKey s necessary to allow for efficient
event-based cache invalidation.
Because persistence and recovery between application shutdown and startup are
internal concerns they are not defined here even though it is expected that most
real-world implementers of this interface would require these features.
On the other hand, EventRegistry must help the Cache to ensure that outdated
content is never served, even if that means discarding potentially valid cached
entries. For this reason, wasRecoverySuccessful() is defined here as part of
the public contract with the Cache.
since: 2.1 author: Geoff Howard version: CVS $Id: EventRegistry.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public Serializable[] | allKeys() Retrieve an array of all keys regardless of event mapping, or null if
no keys are registered.. | public void | clear() Clear all event-key mappings from the registry. | public Serializable[] | keysForEvent(Event e) Retrieve an array of all keys mapped to this event. | public void | register(Event e, Serializable key) | public void | removeKey(Serializable key) Remove all occurances of the specified key from the registry. | public boolean | wasRecoverySuccessful() Returns whether the registry was successful in retrieving its
persisted state during startup.
If recovering persisted data was not successful, the component must
signal that the Cache may contain orphaned EventValidity objects by
returning false. |
allKeys | public Serializable[] allKeys()(Code) | | Retrieve an array of all keys regardless of event mapping, or null if
no keys are registered..
an array of keys which should not be modified |
clear | public void clear()(Code) | | Clear all event-key mappings from the registry.
|
keysForEvent | public Serializable[] keysForEvent(Event e)(Code) | | Retrieve an array of all keys mapped to this event.
Parameters: e - event an array of keys which should not be modified or null if no keys are mapped to this event. |
register | public void register(Event e, Serializable key)(Code) | | Map an event to a key
Parameters: e - event Parameters: key - key |
removeKey | public void removeKey(Serializable key)(Code) | | Remove all occurances of the specified key from the registry.
Parameters: key - - The key to remove. |
wasRecoverySuccessful | public boolean wasRecoverySuccessful()(Code) | | Returns whether the registry was successful in retrieving its
persisted state during startup.
If recovering persisted data was not successful, the component must
signal that the Cache may contain orphaned EventValidity objects by
returning false. The Cache should then ensure that all pipelines
associated with EventValidities are either removed or re-associated
(if possible).
true if the Component recovered its state successfully, false otherwise. |
|
|