|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventRegistry
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.
Field Summary | |
---|---|
static String |
ROLE
The Avalon ROLE for this component |
Method Summary | |
---|---|
Serializable[] |
allKeys()
Retrieve an array of all keys regardless of event mapping, or null if no keys are registered.. |
void |
clear()
Clear all event-key mappings from the registry. |
Serializable[] |
keysForEvent(Event e)
Retrieve an array of all keys mapped to this event. |
void |
register(Event e,
Serializable key)
Map an event to a key |
void |
removeKey(Serializable key)
Remove all occurances of the specified key from the registry. |
boolean |
wasRecoverySuccessful()
Returns whether the registry was successful in retrieving its persisted state during startup. |
Field Detail |
---|
static final String ROLE
Method Detail |
---|
void register(Event e, Serializable key)
e
- eventkey
- keyvoid removeKey(Serializable key)
key
- - The key to remove.Serializable[] keysForEvent(Event e)
e
- event
Serializable[] allKeys()
void clear()
boolean wasRecoverySuccessful()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |