Class MBeanServerRegistrationUtility


  • public final class MBeanServerRegistrationUtility
    extends Object
    A convenience class for registering CacheStatisticsMBeans with an MBeanServer.
    Since:
    Coherence 12.1.3
    Author:
    jf 2013.10.24
    • Method Detail

      • isRegistered

        public static boolean isRegistered​(javax.cache.Cache cache,
                                           MBeanServerRegistrationUtility.ObjectNameType objectNameType)
        Checks whether an ObjectName is already registered.
        Throws:
        javax.cache.CacheException - - all exceptions are wrapped in CacheException
      • calculateObjectName

        public 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>"

        Parameters:
        cache - the JCache that this MBean ObjectName will represent
        objectNameType - whether a Statistics or Configuration MBean type
        Returns:
        computed MBean object name for cache with objectNameType
      • calculateObjectName

        public 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>"

        Parameters:
        mgr - CoherenceBasedCacheManager
        id - the JCache Identier that this MBean ObjectName will represent
        objectNameType - whether a Statistics or Configuration MBean type
        Returns:
        computed MBean object name for cache with objectNameType