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
| Modifier and Type | Field and Description |
|---|---|
| private CacheManager | |
| private SampledCacheManager | |
| private String | |
| private static final Logger | |
| private static final int | |
| private final Map | |
| private final MBeanServer | |
| private volatile String | |
| private Status |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | dispose()
Implements net. |
| public synchronized Status | Returns: the status at the point in time the method is calledImplements net. |
| public void | init()
Implements net. |
| public synchronized void | initialize(CacheManager cacheManagerParam, ClusteredInstanceFactory clusteredInstanceFactory)
Implements net. |
| public synchronized boolean | Returns: true if alive otherwise falseReturns true if this |
| public synchronized boolean | isInitialized()
Implements net. true if initialized otherwise false
|
| public void | notifyCacheAdded(String
the name of the cacheName)Cache the operation relates toImplements net. |
| public void | notifyCacheRemoved(String
the name of the cacheName)Cache the operation relates toImplements net. |
| private void | |
| private void | |
| private void | |
| public synchronized void | reinitialize(ClusteredInstanceFactory clusteredInstanceFactory)
Implements net. |
| cacheManager | back to summary |
|---|---|
| private CacheManager cacheManager | |
| cacheManagerMBean | back to summary |
|---|---|
| private SampledCacheManager cacheManagerMBean | |
| clientUUID | back to summary |
|---|---|
| private String clientUUID | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| MAX_MBEAN_REGISTRATION_RETRIES | back to summary |
|---|---|
| private static final int MAX_MBEAN_REGISTRATION_RETRIES | |
| mbeans | back to summary |
|---|---|
| private final Map<ObjectName, Object> mbeans | |
| mBeanServer | back to summary |
|---|---|
| private final MBeanServer mBeanServer | |
| registeredCacheManagerName | back to summary |
|---|---|
| private volatile String registeredCacheManagerName | |
| status | back to summary |
|---|---|
| private Status status | |
| SampledMBeanRegistrationProvider | back to summary |
|---|---|
| public SampledMBeanRegistrationProvider() Default constructor | |
| dispose | back to summary |
|---|---|
| public synchronized void dispose() throws CacheException Implements net. Stop the listener and free any resources. Removes registered ObjectNames
| |
| getStatus | back to summary |
|---|---|
| public synchronized Status getStatus() Implements net. Returns the listener status.
| |
| init | back to summary |
|---|---|
| public void init() throws CacheException Implements net. CacheManagerEventListener.init() - no need to do anything here
| |
| initialize | back to summary |
|---|---|
| public synchronized void initialize(CacheManager cacheManagerParam, ClusteredInstanceFactory clusteredInstanceFactory) Implements net. Doc from net. Initialize MBeanRegistration if necessary for the cacheManager | |
| isAlive | back to summary |
|---|---|
| public synchronized boolean isAlive() Returns true if this
| |
| isInitialized | back to summary |
|---|---|
| public synchronized boolean isInitialized() Implements net. Doc from net. Returns
| |
| notifyCacheAdded | back to summary |
|---|---|
| public void notifyCacheAdded(String cacheName) Implements net. Called immediately after a cache has been added and activated.
| |
| notifyCacheRemoved | back to summary |
|---|---|
| public void notifyCacheRemoved(String cacheName) Implements net. Called immediately after a cache has been disposed and removed. The calling method will block until this method returns.
| |
| registerCacheManagerMBean | back to summary |
|---|---|
| private void registerCacheManagerMBean(SampledCacheManager cacheManagerMBean) throws Exception | |
| registerCacheMBean | back to summary |
|---|---|
| private void registerCacheMBean(Ehcache cache) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException | |
| registerStoreMBean | back to summary |
|---|---|
| private void registerStoreMBean(Ehcache cache) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException | |
| reinitialize | back to summary |
|---|---|
| public synchronized void reinitialize(ClusteredInstanceFactory clusteredInstanceFactory) throws MBeanRegistrationProviderException Implements net. Doc from net. Reinitialize the mbeans. Uses the current name of the | |