public final class MBeanServerRegistrationUtility extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MBeanServerRegistrationUtility.ObjectNameType
The type of registered Object
|
| Modifier and Type | Method and Description |
|---|---|
static ObjectName |
calculateObjectName(javax.cache.Cache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Creates an object name using the scheme "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>" MultiTenancy support: "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>domainPartition=<domainPartition>"
|
static ObjectName |
calculateObjectName(CoherenceBasedCacheManager mgr, JCacheIdentifier id, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Creates an object name using the scheme "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>" MultiTenancy support: "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>domainPartition=<domainPartition>"
|
static boolean |
isRegistered(javax.cache.Cache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Checks whether an ObjectName is already registered.
|
static void |
registerCacheObject(AbstractCoherenceBasedCache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Utility method for registering CacheStatistics with the platform MBeanServer
|
static void |
unregisterCacheObject(javax.cache.Cache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Removes registered JCache MBean for a Cache
|
static void |
unregisterCacheObject(CoherenceBasedCacheManager mgr, JCacheIdentifier id, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
Removes registered JCache MBean for a Cache
|
public static void registerCacheObject(AbstractCoherenceBasedCache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
cache - the cache to register
public static boolean isRegistered(javax.cache.Cache cache,
MBeanServerRegistrationUtility.ObjectNameType objectNameType)
javax.cache.CacheException - - all exceptions are wrapped in CacheException
public static void unregisterCacheObject(javax.cache.Cache cache,
MBeanServerRegistrationUtility.ObjectNameType objectNameType)
cache - remove registered JCache MBean for this cacheobjectNameType - JCache MBean type MBeanServerRegistrationUtility.ObjectNameTypejavax.cache.CacheException - - all exceptions are wrapped in CacheExceptionpublic static void unregisterCacheObject(CoherenceBasedCacheManager mgr, JCacheIdentifier id, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
mgr - Coherence JCache CacheManager of JCache cache MBean to be unregisteredid - JCache cache identifier of JCache cache MBean to be unregisteredobjectNameType - JCache MBean type MBeanServerRegistrationUtility.ObjectNameType to be unregisteredjavax.cache.CacheException - - all exceptions are wrapped in CacheExceptionpublic static ObjectName calculateObjectName(javax.cache.Cache cache, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
MultiTenancy support: "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>domainPartition=<domainPartition>"
cache - the JCache that this MBean ObjectName will representobjectNameType - whether a Statistics or Configuration MBean typecache with objectNameTypepublic static ObjectName calculateObjectName(CoherenceBasedCacheManager mgr, JCacheIdentifier id, MBeanServerRegistrationUtility.ObjectNameType objectNameType)
MultiTenancy support: "javax.cache:type=Cache<Statistics|Configuration>,CacheManager=<cacheManagerName>,Cache=<cacheName>domainPartition=<domainPartition>"
mgr - CoherenceBasedCacheManagerid - the JCache Identier that this MBean ObjectName will representobjectNameType - whether a Statistics or Configuration MBean typecache with objectNameType