Class JmxRegistration
java.lang.Object
com.github.benmanes.caffeine.jcache.management.JmxRegistration
Jmx cache utilities.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ObjectName
getObjectName
(javax.cache.Cache<?, ?> cache, JmxRegistration.MBeanType type) Returns the object name of the management bean.private static void
register
(ObjectName objectName, Object mbean) Registers the management bean with the given object name.static void
registerMXBean
(javax.cache.Cache<?, ?> cache, Object mxbean, JmxRegistration.MBeanType type) Registers the JMX management bean for the cache.private static String
Returns a sanatized string for use as a management bean name.private static void
unregister
(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.
-
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 registermxbean
- the management beantype
- the mxbean type
-
unregisterMXBean
Unregisters the JMX management bean for the cache.- Parameters:
cache
- the cache to unregistertype
- the mxbean type
-
register
Registers the management bean with the given object name. -
unregister
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
Returns a sanatized string for use as a management bean name.
-