|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheManagerEventListener
Allows implementers to register callback methods that will be executed when a
CacheManager
event occurs.
The lifecycle events are:
Cache
Cache
CacheEventListener
Method Summary | |
---|---|
void |
dispose()
Stop the listener and free any resources. |
Status |
getStatus()
Returns the listener status. |
void |
init()
Call to start the listeners and do any other required initialisation. |
void |
notifyCacheAdded(String cacheName)
Called immediately after a cache has been added and activated. |
void |
notifyCacheRemoved(String cacheName)
Called immediately after a cache has been disposed and removed. |
Method Detail |
---|
void init() throws CacheException
CacheException
- - all exceptions are wrapped in CacheExceptionStatus getStatus()
void dispose() throws CacheException
CacheException
- - all exceptions are wrapped in CacheExceptionvoid notifyCacheAdded(String cacheName)
Note that the CacheManager calls this method from a synchronized method. Any attempt to call a synchronized method on CacheManager from this method will cause a deadlock.
Note that activation will also cause a CacheEventListener status change notification
from Status.STATUS_UNINITIALISED
to
Status.STATUS_ALIVE
. Care should be taken on processing that
notification because:
CacheManager.getEhcache(String)
will cause a deadlock.
cacheName
- the name of the Cache
the operation relates toCacheEventListener
void notifyCacheRemoved(String cacheName)
Note that the CacheManager calls this method from a synchronized method. Any attempt to call a synchronized method on CacheManager from this method will cause a deadlock.
Note that a CacheEventListener
status changed will also be triggered. Any
attempt from that notification to access CacheManager will also result in a deadlock.
cacheName
- the name of the Cache
the operation relates to
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |