DataTreeBean (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server

## Class DataTreeBean

- java.lang.Object
- - org.apache.zookeeper.server.DataTreeBean

- All Implemented Interfaces:
    ZKMBeanInfo, DataTreeMXBean

      public class DataTreeBean
      extends Object
      implements DataTreeMXBean, ZKMBeanInfo

  This class implements the data tree MBean.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataTreeBean(DataTree dataTree)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `approximateDataSize()`
    `int` | `countEphemerals()`
    `String` | `getLastZxid()`
    `String` | `getName()`
    `int` | `getNodeCount()`
    `int` | `getWatchCount()`
    `boolean` | `isHidden()` If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.

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

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

- - ### Constructor Detail

    - #### DataTreeBean

          public DataTreeBean(DataTree dataTree)

  - ### Method Detail

    - #### getNodeCount

          public int getNodeCount()

      Specified by:
        `getNodeCount` in interface `DataTreeMXBean`
      Returns:
        number of znodes in the data tree.

    - #### approximateDataSize

          public long approximateDataSize()

      Specified by:
        `approximateDataSize` in interface `DataTreeMXBean`
      Returns:
        data tree size in bytes. The size includes the znode path and its value.

    - #### countEphemerals

          public int countEphemerals()

      Specified by:
        `countEphemerals` in interface `DataTreeMXBean`
      Returns:
        number of ephemeral nodes in the data tree

    - #### getWatchCount

          public int getWatchCount()

      Specified by:
        `getWatchCount` in interface `DataTreeMXBean`
      Returns:
        number of watches set.

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `ZKMBeanInfo`
      Returns:
        a string identifying the MBean

    - #### isHidden

          public boolean isHidden()

      Description copied from interface: `ZKMBeanInfo`
      If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools. Used for grouping MBeans.
      Specified by:
        `isHidden` in interface `ZKMBeanInfo`
      Returns:
        true if the MBean is hidden.

    - #### getLastZxid

          public String getLastZxid()

      Specified by:
        `getLastZxid` in interface `DataTreeMXBean`
      Returns:
        the most recent zxid processed by the data tree.

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.