Class JmxSupport

  • All Implemented Interfaces:
    org.cache2k.config.Feature, org.cache2k.config.SingleFeature

    public final class JmxSupport
    extends org.cache2k.config.ToggleFeature
    Adds optional support for JMX.

    Registering a name may fail because cache manager names may be identical in different class loaders.

    • Constructor Summary

      Constructors 
      Constructor Description
      JmxSupport()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void disable​(org.cache2k.Cache2kBuilder<?,​?> builder)
      Disable JMX monitoring.
      <K,​V>
      void
      doEnlist​(org.cache2k.config.CacheBuildContext<K,​V> ctx)
      If enabled register lifecycle listeners so we get called as soon as the cache is build or closed.
      static void enable​(org.cache2k.Cache2kBuilder<?,​?> builder)
      Enable JMX monitoring.
      • Methods inherited from class org.cache2k.config.ToggleFeature

        disable, enable, enlist, equals, extract, hashCode, isEnabled, isEnabled, setEnable, setEnabled, toString
    • Constructor Detail

      • JmxSupport

        public JmxSupport()
    • Method Detail

      • enable

        public static void enable​(org.cache2k.Cache2kBuilder<?,​?> builder)
        Enable JMX monitoring.
      • disable

        public static void disable​(org.cache2k.Cache2kBuilder<?,​?> builder)
        Disable JMX monitoring.
      • doEnlist

        public <K,​V> void doEnlist​(org.cache2k.config.CacheBuildContext<K,​V> ctx)
        If enabled register lifecycle listeners so we get called as soon as the cache is build or closed.
        Specified by:
        doEnlist in class org.cache2k.config.ToggleFeature