public interface CacheManagerEventListener
CacheManager
event occurs.
The lifecycle events are:
Cache
Cache
CacheEventListener
Modifier and Type | Method and Description |
---|---|
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.
|
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)
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)
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 toCopyright © 2003–2016 Terracotta, Inc.. All rights reserved.