Package org.infinispan.jmx
Class CacheJmxRegistration
- java.lang.Object
-
- org.infinispan.jmx.CacheJmxRegistration
-
- All Implemented Interfaces:
ObjectNameKeys
public final class CacheJmxRegistration extends java.lang.ObjectIfConfiguration.jmxStatistics()is enabled, then class will register all the MBeans from cache local's ConfigurationRegistry to the MBean server.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Galder ZamarreƱo
-
-
Field Summary
-
Fields inherited from interface org.infinispan.jmx.ObjectNameKeys
COMPONENT, MANAGER, NAME, TYPE
-
-
Constructor Summary
Constructors Constructor Description CacheJmxRegistration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDomain()Gets the domain name.java.lang.StringgetGroupName()Gets the group name.javax.management.MBeanServergetMBeanServer()Gets the MBean server.protected java.lang.StringinitGroup()Subclasses must implement this hook to initializegroupNameduring start.javax.management.ObjectNameregisterExternalMBean(java.lang.Object managedComponent, java.lang.String groupName)Registers a MBean, but does not track it to perform automatic unregistration on stop.voidregisterMBean(java.lang.Object managedComponent)Registers a MBean (and tracks it to perform automatic unregistration on stop).voidregisterMBean(java.lang.Object managedComponent, java.lang.String groupName)Registers a MBean (and tracks it to perform automatic unregistration on stop).voidstart()Looks up the MBean server and initializes domain and group.voidstop()Unregisters the MBeans that were registered on start.
-
-
-
Method Detail
-
start
public void start()
Looks up the MBean server and initializes domain and group. Overriders must ensure they call super.
-
stop
public void stop()
Unregisters the MBeans that were registered on start. Overriders must ensure they call super.
-
initGroup
protected java.lang.String initGroup()
Subclasses must implement this hook to initializegroupNameduring start.
-
getDomain
public final java.lang.String getDomain()
Gets the domain name. This should not be called unless JMX is enabled.
-
getGroupName
public final java.lang.String getGroupName()
Gets the group name. This should not be called unless JMX is enabled.
-
getMBeanServer
public final javax.management.MBeanServer getMBeanServer()
Gets the MBean server. This should not be called unless JMX is enabled.
-
registerExternalMBean
public javax.management.ObjectName registerExternalMBean(java.lang.Object managedComponent, java.lang.String groupName) throws java.lang.ExceptionRegisters a MBean, but does not track it to perform automatic unregistration on stop. The caller is expected to perform unregistration using the returned ObjectName.- Throws:
java.lang.Exception
-
registerMBean
public void registerMBean(java.lang.Object managedComponent)
Registers a MBean (and tracks it to perform automatic unregistration on stop). This method should be used for components that are registered after the startup of the component registry and did not get registered automatically.
-
registerMBean
public void registerMBean(java.lang.Object managedComponent, java.lang.String groupName)Registers a MBean (and tracks it to perform automatic unregistration on stop). This method should be used only for components that are registered after the startup of the component registry and did not get registered automatically.
-
-