|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.management.sampled.SampledMBeanRegistrationProvider
public class SampledMBeanRegistrationProvider
An implementation of MBeanRegistrationProvider
which registers
sampled MBeans for the CacheManager and its Caches.
This also implements CacheManagerEventListener
to add/remove/cleanup
MBeans for new caches added or removed
Constructor Summary | |
---|---|
SampledMBeanRegistrationProvider()
Default constructor |
Method Summary | |
---|---|
void |
dispose()
Stop the listener and free any resources. |
Status |
getStatus()
Returns the listener status. |
void |
init()
CacheManagerEventListener.init() - no need to do anything here |
void |
initialize(CacheManager cacheManagerParam,
ClusteredInstanceFactory clusteredInstanceFactory)
Initialize MBeanRegistration if necessary for the cacheManager |
boolean |
isAlive()
Returns true if this SampledMBeanRegistrationProvider is alive |
boolean |
isInitialized()
Returns true if initialized otherwise false |
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 |
reinitialize(ClusteredInstanceFactory clusteredInstanceFactory)
Reinitialize the mbeans. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampledMBeanRegistrationProvider()
Method Detail |
---|
public void initialize(CacheManager cacheManagerParam, ClusteredInstanceFactory clusteredInstanceFactory)
initialize
in interface MBeanRegistrationProvider
public void reinitialize(ClusteredInstanceFactory clusteredInstanceFactory) throws MBeanRegistrationProviderException
CacheManager
to re-register the mbeans
reinitialize
in interface MBeanRegistrationProvider
MBeanRegistrationProviderException
public boolean isInitialized()
isInitialized
in interface MBeanRegistrationProvider
public void init() throws CacheException
init
in interface CacheManagerEventListener
CacheException
- - all exceptions are wrapped in CacheExceptionpublic Status getStatus()
getStatus
in interface CacheManagerEventListener
public void dispose() throws CacheException
dispose
in interface CacheManagerEventListener
CacheException
- - all exceptions are wrapped in CacheExceptionpublic boolean isAlive()
SampledMBeanRegistrationProvider
is alive
public void notifyCacheAdded(String cacheName)
notifyCacheAdded
in interface CacheManagerEventListener
cacheName
- the name of the Cache
the operation relates toCacheEventListener
public void notifyCacheRemoved(String cacheName)
notifyCacheRemoved
in interface CacheManagerEventListener
cacheName
- the name of the Cache
the operation relates to
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |