MBeans (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.metrics2.util, class: MBeans

Package org.apache.hadoop.metrics2.util

# Class MBeans

java.lang.Object
org.apache.hadoop.metrics2.util.MBeans

@Public @Stable public final class MBeans extends Object
This util class provides a method to register an MBean using our standard naming convention as described in the doc for {link `register(String, String, Object)`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getMbeanNameName(ObjectName objectName)`
  `static String`
  `getMbeanNameService(ObjectName objectName)`
  `static ObjectName`
  `register(String serviceName, String nameName, Object theMbean)`
  Register the MBean using our standard MBeanName format "hadoop:service=<serviceName>,name=<nameName>" Where the <serviceName> and <nameName> are the supplied parameters.
  `static ObjectName`
  `register(String serviceName, String nameName, Map<String,String> properties, Object theMbean)`
  Register the MBean using our standard MBeanName format "hadoop:service=<serviceName>,name=<nameName>" Where the <serviceName> and <nameName> are the supplied parameters.
  `static void`
  `unregister(ObjectName mbeanName)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### register

    public static ObjectName register(String serviceName, String nameName, Object theMbean)
    Register the MBean using our standard MBeanName format "hadoop:service=<serviceName>,name=<nameName>" Where the <serviceName> and <nameName> are the supplied parameters.
    Parameters:
      `serviceName` - serviceName.
      `nameName` - nameName.
      `theMbean` - - the MBean to register
    Returns:
      the named used to register the MBean

  - ### register

    public static ObjectName register(String serviceName, String nameName, Map<String,String> properties, Object theMbean)
    Register the MBean using our standard MBeanName format "hadoop:service=<serviceName>,name=<nameName>" Where the <serviceName> and <nameName> are the supplied parameters.
    Parameters:
      `serviceName` - serviceName.
      `nameName` - nameName.
      `properties` - - Key value pairs to define additional JMX ObjectName properties.
      `theMbean` - - the MBean to register
    Returns:
      the named used to register the MBean

  - ### getMbeanNameService

    public static String getMbeanNameService(ObjectName objectName)

  - ### getMbeanNameName

    public static String getMbeanNameName(ObjectName objectName)

  - ### unregister

    public static void unregister(ObjectName mbeanName)