org.apache.hadoop.metrics2.util

## Class MBeans

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

-     @InterfaceAudience.Public
       @InterfaceStability.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

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getMbeanNameName(ObjectName objectName)`
    `static String` | `getMbeanNameService(ObjectName objectName)`
    `static ObjectName` | `register(String serviceName, String nameName, Map<String,String> properties, Object theMbean)` Register the MBean using our standard MBeanName format "hadoop:service=,name=" Where the and are the supplied parameters.
    `static ObjectName` | `register(String serviceName, String nameName, Object theMbean)` Register the MBean using our standard MBeanName format "hadoop:service=,name=" Where the and 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 Detail

    - #### register

          public static ObjectName register(String serviceName,
                                            String nameName,
                                            Object theMbean)

      Register the MBean using our standard MBeanName format "hadoop:service=,name=" Where the and are the supplied parameters.
      Parameters:
        `serviceName` -
        `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=,name=" Where the and are the supplied parameters.
      Parameters:
        `serviceName` -
        `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)

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.