|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LifecycleAware
Event handlers implement this so they can be notified when a cache is created and also when it is destroyed. This allows event handlers to load any configuration and/or resources they need on startup and then release them again when the cache is shut down.
CacheEventListener
Method Summary | |
---|---|
void |
finialize()
Called by the cache administrator class when a cache is destroyed. |
void |
initialize(Cache cache,
Config config)
Called by the cache administrator class when a cache is instantiated. |
Method Detail |
---|
void initialize(Cache cache, Config config) throws InitializationException
cache
- the cache instance that this listener is attached to.config
- The cache's configuration details. This allows the event handler
to initialize itself based on the cache settings, and also to receive additional
settings that were part of the cache configuration but that the cache
itself does not care about. If you are using cache.properties
for your configuration, simply add any additional properties that your event
handler requires and they will be passed through in this parameter.
InitializationException
- thrown when there was a problem initializing the
listener. The cache administrator will log this error and disable the listener.void finialize() throws FinalizationException
FinalizationException
- thrown when there was a problem finalizing the
listener. The cache administrator will catch and log this error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |