Class JmxRegistration


  • public final class JmxRegistration
    extends java.lang.Object
    Jmx cache utilities.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JmxRegistration()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static javax.management.ObjectName getObjectName​(javax.cache.Cache<?,​?> cache, JmxRegistration.MBeanType type)
      Returns the object name of the management bean.
      private static void register​(javax.management.ObjectName objectName, java.lang.Object mbean)
      Registers the management bean with the given object name.
      static void registerMXBean​(javax.cache.Cache<?,​?> cache, java.lang.Object mxbean, JmxRegistration.MBeanType type)
      Registers the JMX management bean for the cache.
      private static java.lang.String sanitize​(java.lang.String name)
      Returns a sanatized string for use as a management bean name.
      private static void unregister​(javax.management.ObjectName objectName)
      Unregisters the management bean(s) with the given object name.
      static void unregisterMXBean​(CacheProxy<?,​?> cache, JmxRegistration.MBeanType type)
      Unregisters the JMX management bean for the cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JmxRegistration

        private JmxRegistration()
    • Method Detail

      • registerMXBean

        public static void registerMXBean​(javax.cache.Cache<?,​?> cache,
                                          java.lang.Object mxbean,
                                          JmxRegistration.MBeanType type)
        Registers the JMX management bean for the cache.
        Parameters:
        cache - the cache to register
        mxbean - the management bean
        type - the mxbean type
      • unregisterMXBean

        public static void unregisterMXBean​(CacheProxy<?,​?> cache,
                                            JmxRegistration.MBeanType type)
        Unregisters the JMX management bean for the cache.
        Parameters:
        cache - the cache to unregister
        type - the mxbean type
      • register

        private static void register​(javax.management.ObjectName objectName,
                                     java.lang.Object mbean)
        Registers the management bean with the given object name.
      • unregister

        private static void unregister​(javax.management.ObjectName objectName)
        Unregisters the management bean(s) with the given object name.
      • getObjectName

        private static javax.management.ObjectName getObjectName​(javax.cache.Cache<?,​?> cache,
                                                                 JmxRegistration.MBeanType type)
        Returns the object name of the management bean.
      • sanitize

        private static java.lang.String sanitize​(java.lang.String name)
        Returns a sanatized string for use as a management bean name.