| com.opensymphony.oscache.base.LifecycleAware
All known Subclasses: com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener,
LifecycleAware | public interface LifecycleAware (Code) | | 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.
author: Chris Miller See Also: com.opensymphony.oscache.base.events.CacheEventListener |
Method Summary | |
public void | finialize() Called by the cache administrator class when a cache is destroyed.
throws: FinalizationException - thrown when there was a problem finalizing thelistener. | public void | initialize(Cache cache, Config config) Called by the cache administrator class when a cache is instantiated.
Parameters: cache - the cache instance that this listener is attached to. Parameters: config - The cache's configuration details. |
finialize | public void finialize() throws FinalizationException(Code) | | Called by the cache administrator class when a cache is destroyed.
throws: FinalizationException - thrown when there was a problem finalizing thelistener. The cache administrator will catch and log this error. |
initialize | public void initialize(Cache cache, Config config) throws InitializationException(Code) | | Called by the cache administrator class when a cache is instantiated.
Parameters: cache - the cache instance that this listener is attached to. Parameters: config - The cache's configuration details. This allows the event handlerto initialize itself based on the cache settings, and also to receive additionalsettings that were part of the cache configuration but that the cacheitself does not care about. If you are using cache.properties for your configuration, simply add any additional properties that your eventhandler requires and they will be passed through in this parameter. throws: InitializationException - thrown when there was a problem initializing thelistener. The cache administrator will log this error and disable the listener. |
|
|