Class JmxRegistration

java.lang.Object
com.github.benmanes.caffeine.jcache.management.JmxRegistration

public final class JmxRegistration extends Object
Jmx cache utilities.
  • Constructor Details

    • JmxRegistration

      private JmxRegistration()
  • Method Details

    • registerMXBean

      public static void registerMXBean(javax.cache.Cache<?,?> cache, 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(ObjectName objectName, Object mbean)
      Registers the management bean with the given object name.
    • unregister

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

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

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