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

org.apache.zookeeper.server

## Class ZooKeeperServerBean

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

- All Implemented Interfaces:
    ZKMBeanInfo, ZooKeeperServerMXBean
  Direct Known Subclasses:
    FollowerBean, LeaderBean, ObserverBean, ReadOnlyBean

      public class ZooKeeperServerBean
      extends Object
      implements ZooKeeperServerMXBean, ZKMBeanInfo

  This class implements the ZooKeeper server MBean interface.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ZooKeeperServer` | `zks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZooKeeperServerBean(ZooKeeperServer zks)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getAuthFailedCount()`
    `double` | `getAvgRequestLatency()`
    `String` | `getClientPort()`
    `int` | `getCommitProcMaxCommitBatchSize()`
    `int` | `getCommitProcMaxReadBatchSize()`
    `double` | `getConnectionDecreaseRatio()`
    `double` | `getConnectionDropDecrease()`
    `double` | `getConnectionDropIncrease()`
    `int` | `getConnectionFreezeTime()`
    `int` | `getConnectionMaxTokens()`
    `int` | `getConnectionTokenFillCount()`
    `int` | `getConnectionTokenFillTime()`
    `long` | `getDataDirSize()`
    `long` | `getFlushDelay()`
    `long` | `getFsyncThresholdExceedCount()`
    `int` | `getJuteMaxBufferSize()`
    `int` | `getLargeRequestMaxBytes()`
    `int` | `getLargeRequestThreshold()`
    `int` | `getLastClientResponseSize()`
    `long` | `getLogDirSize()`
    `int` | `getMaxBatchSize()`
    `int` | `getMaxClientCnxnsPerHost()` Current maxClientCnxns allowed from a particular host
    `int` | `getMaxClientResponseSize()`
    `int` | `getMaxCnxns()`
    `long` | `getMaxRequestLatency()`
    `int` | `getMaxSessionTimeout()` Current maxSessionTimeout of the server in milliseconds
    `long` | `getMaxWriteQueuePollTime()`
    `int` | `getMinClientResponseSize()`
    `long` | `getMinRequestLatency()`
    `int` | `getMinSessionTimeout()` Current minSessionTimeout of the server in milliseconds
    `String` | `getName()`
    `long` | `getNonMTLSLocalConnCount()`
    `long` | `getNonMTLSRemoteConnCount()`
    `long` | `getNumAliveConnections()`
    `long` | `getOutstandingRequests()`
    `long` | `getPacketsReceived()`
    `long` | `getPacketsSent()`
    `boolean` | `getRequestStaleConnectionCheck()`
    `boolean` | `getRequestStaleLatencyCheck()`
    `boolean` | `getRequestThrottleDropStale()`
    `int` | `getRequestThrottleLimit()`
    `int` | `getRequestThrottleStallTime()`
    `boolean` | `getResponseCachingEnabled()`
    `String` | `getSecureClientAddress()`
    `String` | `getSecureClientPort()`
    `String` | `getStartTime()`
    `int` | `getThrottledOpWaitTime()`
    `int` | `getTickTime()` Current TickTime of server in milliseconds
    `long` | `getTxnLogElapsedSyncTime()` Returns the elapsed sync of time of transaction log in milliseconds.
    `String` | `getVersion()`
    `boolean` | `isHidden()` If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.
    `void` | `resetAuthFailedCount()` Reset AuthFailedCount statistics only.
    `void` | `resetFsyncThresholdExceedCount()` Reset Fsync Threshold Exceed Count statistics only.
    `void` | `resetLatency()` Reset min/avg/max latency statistics
    `void` | `resetMaxLatency()` Reset max latency statistics only.
    `void` | `resetNonMTLSConnCount()` Reset NonMTLS(Local+Remote)ConnCount statistics only.
    `void` | `resetStatistics()` Reset packet and latency statistics
    `void` | `setCommitProcMaxCommitBatchSize(int size)`
    `void` | `setCommitProcMaxReadBatchSize(int size)`
    `void` | `setConnectionDecreaseRatio(double val)`
    `void` | `setConnectionDropDecrease(double val)`
    `void` | `setConnectionDropIncrease(double val)`
    `void` | `setConnectionFreezeTime(int val)`
    `void` | `setConnectionMaxTokens(int val)`
    `void` | `setConnectionTokenFillCount(int val)`
    `void` | `setConnectionTokenFillTime(int val)`
    `void` | `setFlushDelay(long delay)`
    `void` | `setLargeRequestMaxBytes(int bytes)`
    `void` | `setLargeRequestThreshold(int threshold)`
    `void` | `setMaxBatchSize(int size)`
    `void` | `setMaxClientCnxnsPerHost(int max)` Set maxClientCnxns allowed from a particular host
    `void` | `setMaxSessionTimeout(int max)` Set maxSessionTimeout of server in milliseconds
    `void` | `setMaxWriteQueuePollTime(long delay)`
    `void` | `setMinSessionTimeout(int min)` Set minSessionTimeout of server in milliseconds
    `void` | `setRequestStaleConnectionCheck(boolean check)`
    `void` | `setRequestStaleLatencyCheck(boolean check)`
    `void` | `setRequestThrottleDropStale(boolean drop)`
    `void` | `setRequestThrottleLimit(int requests)`
    `void` | `setRequestThrottleStallTime(int time)`
    `void` | `setResponseCachingEnabled(boolean isEnabled)`
    `void` | `setThrottledOpWaitTime(int val)`
    `void` | `setTickTime(int tickTime)` Set TickTime of server in milliseconds

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

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

- - ### Field Detail

    - #### zks

          protected final ZooKeeperServer zks

  - ### Constructor Detail

    - #### ZooKeeperServerBean

          public ZooKeeperServerBean(ZooKeeperServer zks)

  - ### Method Detail

    - #### getClientPort

          public String getClientPort()

      Specified by:
        `getClientPort` in interface `ZooKeeperServerMXBean`
      Returns:
        the server socket port number

    - #### 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.

    - #### getStartTime

          public String getStartTime()

      Specified by:
        `getStartTime` in interface `ZooKeeperServerMXBean`
      Returns:
        time the server was started

    - #### getVersion

          public String getVersion()

      Specified by:
        `getVersion` in interface `ZooKeeperServerMXBean`
      Returns:
        the zookeeper server version

    - #### getAvgRequestLatency

          public double getAvgRequestLatency()

      Specified by:
        `getAvgRequestLatency` in interface `ZooKeeperServerMXBean`
      Returns:
        average request latency in ms

    - #### getMaxRequestLatency

          public long getMaxRequestLatency()

      Specified by:
        `getMaxRequestLatency` in interface `ZooKeeperServerMXBean`
      Returns:
        max request latency in ms

    - #### getMinRequestLatency

          public long getMinRequestLatency()

      Specified by:
        `getMinRequestLatency` in interface `ZooKeeperServerMXBean`
      Returns:
        min request latency in ms

    - #### getOutstandingRequests

          public long getOutstandingRequests()

      Specified by:
        `getOutstandingRequests` in interface `ZooKeeperServerMXBean`
      Returns:
        number of outstanding requests.

    - #### getTickTime

          public int getTickTime()

      Description copied from interface: `ZooKeeperServerMXBean`
      Current TickTime of server in milliseconds
      Specified by:
        `getTickTime` in interface `ZooKeeperServerMXBean`

    - #### setTickTime

          public void setTickTime(int tickTime)

      Description copied from interface: `ZooKeeperServerMXBean`
      Set TickTime of server in milliseconds
      Specified by:
        `setTickTime` in interface `ZooKeeperServerMXBean`

    - #### getMaxClientCnxnsPerHost

          public int getMaxClientCnxnsPerHost()

      Description copied from interface: `ZooKeeperServerMXBean`
      Current maxClientCnxns allowed from a particular host
      Specified by:
        `getMaxClientCnxnsPerHost` in interface `ZooKeeperServerMXBean`

    - #### setMaxClientCnxnsPerHost

          public void setMaxClientCnxnsPerHost(int max)

      Description copied from interface: `ZooKeeperServerMXBean`
      Set maxClientCnxns allowed from a particular host
      Specified by:
        `setMaxClientCnxnsPerHost` in interface `ZooKeeperServerMXBean`

    - #### getMinSessionTimeout

          public int getMinSessionTimeout()

      Description copied from interface: `ZooKeeperServerMXBean`
      Current minSessionTimeout of the server in milliseconds
      Specified by:
        `getMinSessionTimeout` in interface `ZooKeeperServerMXBean`

    - #### setMinSessionTimeout

          public void setMinSessionTimeout(int min)

      Description copied from interface: `ZooKeeperServerMXBean`
      Set minSessionTimeout of server in milliseconds
      Specified by:
        `setMinSessionTimeout` in interface `ZooKeeperServerMXBean`

    - #### getMaxSessionTimeout

          public int getMaxSessionTimeout()

      Description copied from interface: `ZooKeeperServerMXBean`
      Current maxSessionTimeout of the server in milliseconds
      Specified by:
        `getMaxSessionTimeout` in interface `ZooKeeperServerMXBean`

    - #### setMaxSessionTimeout

          public void setMaxSessionTimeout(int max)

      Description copied from interface: `ZooKeeperServerMXBean`
      Set maxSessionTimeout of server in milliseconds
      Specified by:
        `setMaxSessionTimeout` in interface `ZooKeeperServerMXBean`

    - #### getDataDirSize

          public long getDataDirSize()

      Specified by:
        `getDataDirSize` in interface `ZooKeeperServerMXBean`
      Returns:
        estimated size of data directory in bytes

    - #### getLogDirSize

          public long getLogDirSize()

      Specified by:
        `getLogDirSize` in interface `ZooKeeperServerMXBean`
      Returns:
        estimated size of log directory in bytes

    - #### getPacketsReceived

          public long getPacketsReceived()

      Specified by:
        `getPacketsReceived` in interface `ZooKeeperServerMXBean`
      Returns:
        number of packets received so far

    - #### getPacketsSent

          public long getPacketsSent()

      Specified by:
        `getPacketsSent` in interface `ZooKeeperServerMXBean`
      Returns:
        number of packets sent so far

    - #### getFsyncThresholdExceedCount

          public long getFsyncThresholdExceedCount()

      Specified by:
        `getFsyncThresholdExceedCount` in interface `ZooKeeperServerMXBean`
      Returns:
        number of fsync threshold exceeds so far

    - #### getAuthFailedCount

          public long getAuthFailedCount()

      Specified by:
        `getAuthFailedCount` in interface `ZooKeeperServerMXBean`
      Returns:
        number of AuthFailedCount so far

    - #### getNonMTLSRemoteConnCount

          public long getNonMTLSRemoteConnCount()

      Specified by:
        `getNonMTLSRemoteConnCount` in interface `ZooKeeperServerMXBean`
      Returns:
        number of NonMTLSRemoteConnCount so far

    - #### getNonMTLSLocalConnCount

          public long getNonMTLSLocalConnCount()

      Specified by:
        `getNonMTLSLocalConnCount` in interface `ZooKeeperServerMXBean`
      Returns:
        number of NonMTLSLocalConnCount so far

    - #### resetLatency

          public void resetLatency()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset min/avg/max latency statistics
      Specified by:
        `resetLatency` in interface `ZooKeeperServerMXBean`

    - #### resetMaxLatency

          public void resetMaxLatency()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset max latency statistics only.
      Specified by:
        `resetMaxLatency` in interface `ZooKeeperServerMXBean`

    - #### resetFsyncThresholdExceedCount

          public void resetFsyncThresholdExceedCount()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset Fsync Threshold Exceed Count statistics only.
      Specified by:
        `resetFsyncThresholdExceedCount` in interface `ZooKeeperServerMXBean`

    - #### resetAuthFailedCount

          public void resetAuthFailedCount()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset AuthFailedCount statistics only.
      Specified by:
        `resetAuthFailedCount` in interface `ZooKeeperServerMXBean`

    - #### resetNonMTLSConnCount

          public void resetNonMTLSConnCount()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset NonMTLS(Local+Remote)ConnCount statistics only.
      Specified by:
        `resetNonMTLSConnCount` in interface `ZooKeeperServerMXBean`

    - #### resetStatistics

          public void resetStatistics()

      Description copied from interface: `ZooKeeperServerMXBean`
      Reset packet and latency statistics
      Specified by:
        `resetStatistics` in interface `ZooKeeperServerMXBean`

    - #### getNumAliveConnections

          public long getNumAliveConnections()

      Specified by:
        `getNumAliveConnections` in interface `ZooKeeperServerMXBean`
      Returns:
        number of alive client connections

    - #### getSecureClientPort

          public String getSecureClientPort()

      Specified by:
        `getSecureClientPort` in interface `ZooKeeperServerMXBean`
      Returns:
        secure client port

    - #### getSecureClientAddress

          public String getSecureClientAddress()

      Specified by:
        `getSecureClientAddress` in interface `ZooKeeperServerMXBean`
      Returns:
        secure client address

    - #### getTxnLogElapsedSyncTime

          public long getTxnLogElapsedSyncTime()

      Description copied from interface: `ZooKeeperServerMXBean`
      Returns the elapsed sync of time of transaction log in milliseconds.
      Specified by:
        `getTxnLogElapsedSyncTime` in interface `ZooKeeperServerMXBean`

    - #### getJuteMaxBufferSize

          public int getJuteMaxBufferSize()

      Specified by:
        `getJuteMaxBufferSize` in interface `ZooKeeperServerMXBean`
      Returns:
        Returns the value of the following config setting: jute.maxbuffer

    - #### getLastClientResponseSize

          public int getLastClientResponseSize()

      Specified by:
        `getLastClientResponseSize` in interface `ZooKeeperServerMXBean`
      Returns:
        size of latest generated client response

    - #### getMinClientResponseSize

          public int getMinClientResponseSize()

      Specified by:
        `getMinClientResponseSize` in interface `ZooKeeperServerMXBean`
      Returns:
        size of smallest generated client response

    - #### getMaxClientResponseSize

          public int getMaxClientResponseSize()

      Specified by:
        `getMaxClientResponseSize` in interface `ZooKeeperServerMXBean`
      Returns:
        size of largest generated client response

    - #### getResponseCachingEnabled

          public boolean getResponseCachingEnabled()

      Specified by:
        `getResponseCachingEnabled` in interface `ZooKeeperServerMXBean`

    - #### setResponseCachingEnabled

          public void setResponseCachingEnabled(boolean isEnabled)

      Specified by:
        `setResponseCachingEnabled` in interface `ZooKeeperServerMXBean`

    - #### getConnectionMaxTokens

          public int getConnectionMaxTokens()

      Specified by:
        `getConnectionMaxTokens` in interface `ZooKeeperServerMXBean`

    - #### setConnectionMaxTokens

          public void setConnectionMaxTokens(int val)

      Specified by:
        `setConnectionMaxTokens` in interface `ZooKeeperServerMXBean`

    - #### getConnectionTokenFillTime

          public int getConnectionTokenFillTime()

      Specified by:
        `getConnectionTokenFillTime` in interface `ZooKeeperServerMXBean`

    - #### setConnectionTokenFillTime

          public void setConnectionTokenFillTime(int val)

      Specified by:
        `setConnectionTokenFillTime` in interface `ZooKeeperServerMXBean`

    - #### getConnectionTokenFillCount

          public int getConnectionTokenFillCount()

      Specified by:
        `getConnectionTokenFillCount` in interface `ZooKeeperServerMXBean`

    - #### setConnectionTokenFillCount

          public void setConnectionTokenFillCount(int val)

      Specified by:
        `setConnectionTokenFillCount` in interface `ZooKeeperServerMXBean`

    - #### getConnectionFreezeTime

          public int getConnectionFreezeTime()

      Specified by:
        `getConnectionFreezeTime` in interface `ZooKeeperServerMXBean`

    - #### setConnectionFreezeTime

          public void setConnectionFreezeTime(int val)

      Specified by:
        `setConnectionFreezeTime` in interface `ZooKeeperServerMXBean`

    - #### getConnectionDropIncrease

          public double getConnectionDropIncrease()

      Specified by:
        `getConnectionDropIncrease` in interface `ZooKeeperServerMXBean`

    - #### setConnectionDropIncrease

          public void setConnectionDropIncrease(double val)

      Specified by:
        `setConnectionDropIncrease` in interface `ZooKeeperServerMXBean`

    - #### getConnectionDropDecrease

          public double getConnectionDropDecrease()

      Specified by:
        `getConnectionDropDecrease` in interface `ZooKeeperServerMXBean`

    - #### setConnectionDropDecrease

          public void setConnectionDropDecrease(double val)

      Specified by:
        `setConnectionDropDecrease` in interface `ZooKeeperServerMXBean`

    - #### getConnectionDecreaseRatio

          public double getConnectionDecreaseRatio()

      Specified by:
        `getConnectionDecreaseRatio` in interface `ZooKeeperServerMXBean`

    - #### setConnectionDecreaseRatio

          public void setConnectionDecreaseRatio(double val)

      Specified by:
        `setConnectionDecreaseRatio` in interface `ZooKeeperServerMXBean`

    - #### getCommitProcMaxReadBatchSize

          public int getCommitProcMaxReadBatchSize()

      Specified by:
        `getCommitProcMaxReadBatchSize` in interface `ZooKeeperServerMXBean`

    - #### setCommitProcMaxReadBatchSize

          public void setCommitProcMaxReadBatchSize(int size)

      Specified by:
        `setCommitProcMaxReadBatchSize` in interface `ZooKeeperServerMXBean`

    - #### getCommitProcMaxCommitBatchSize

          public int getCommitProcMaxCommitBatchSize()

      Specified by:
        `getCommitProcMaxCommitBatchSize` in interface `ZooKeeperServerMXBean`

    - #### setCommitProcMaxCommitBatchSize

          public void setCommitProcMaxCommitBatchSize(int size)

      Specified by:
        `setCommitProcMaxCommitBatchSize` in interface `ZooKeeperServerMXBean`

    - #### getFlushDelay

          public long getFlushDelay()

      Specified by:
        `getFlushDelay` in interface `ZooKeeperServerMXBean`

    - #### setFlushDelay

          public void setFlushDelay(long delay)

      Specified by:
        `setFlushDelay` in interface `ZooKeeperServerMXBean`

    - #### getThrottledOpWaitTime

          public int getThrottledOpWaitTime()

      Specified by:
        `getThrottledOpWaitTime` in interface `ZooKeeperServerMXBean`

    - #### setThrottledOpWaitTime

          public void setThrottledOpWaitTime(int val)

      Specified by:
        `setThrottledOpWaitTime` in interface `ZooKeeperServerMXBean`

    - #### getRequestThrottleLimit

          public int getRequestThrottleLimit()

      Specified by:
        `getRequestThrottleLimit` in interface `ZooKeeperServerMXBean`

    - #### setRequestThrottleLimit

          public void setRequestThrottleLimit(int requests)

      Specified by:
        `setRequestThrottleLimit` in interface `ZooKeeperServerMXBean`

    - #### getRequestThrottleStallTime

          public int getRequestThrottleStallTime()

      Specified by:
        `getRequestThrottleStallTime` in interface `ZooKeeperServerMXBean`

    - #### setRequestThrottleStallTime

          public void setRequestThrottleStallTime(int time)

      Specified by:
        `setRequestThrottleStallTime` in interface `ZooKeeperServerMXBean`

    - #### getRequestThrottleDropStale

          public boolean getRequestThrottleDropStale()

      Specified by:
        `getRequestThrottleDropStale` in interface `ZooKeeperServerMXBean`

    - #### setRequestThrottleDropStale

          public void setRequestThrottleDropStale(boolean drop)

      Specified by:
        `setRequestThrottleDropStale` in interface `ZooKeeperServerMXBean`

    - #### getMaxWriteQueuePollTime

          public long getMaxWriteQueuePollTime()

      Specified by:
        `getMaxWriteQueuePollTime` in interface `ZooKeeperServerMXBean`

    - #### setMaxWriteQueuePollTime

          public void setMaxWriteQueuePollTime(long delay)

      Specified by:
        `setMaxWriteQueuePollTime` in interface `ZooKeeperServerMXBean`

    - #### getRequestStaleLatencyCheck

          public boolean getRequestStaleLatencyCheck()

      Specified by:
        `getRequestStaleLatencyCheck` in interface `ZooKeeperServerMXBean`

    - #### setRequestStaleLatencyCheck

          public void setRequestStaleLatencyCheck(boolean check)

      Specified by:
        `setRequestStaleLatencyCheck` in interface `ZooKeeperServerMXBean`

    - #### getMaxBatchSize

          public int getMaxBatchSize()

      Specified by:
        `getMaxBatchSize` in interface `ZooKeeperServerMXBean`

    - #### setMaxBatchSize

          public void setMaxBatchSize(int size)

      Specified by:
        `setMaxBatchSize` in interface `ZooKeeperServerMXBean`

    - #### getRequestStaleConnectionCheck

          public boolean getRequestStaleConnectionCheck()

      Specified by:
        `getRequestStaleConnectionCheck` in interface `ZooKeeperServerMXBean`

    - #### setRequestStaleConnectionCheck

          public void setRequestStaleConnectionCheck(boolean check)

      Specified by:
        `setRequestStaleConnectionCheck` in interface `ZooKeeperServerMXBean`

    - #### getLargeRequestMaxBytes

          public int getLargeRequestMaxBytes()

      Specified by:
        `getLargeRequestMaxBytes` in interface `ZooKeeperServerMXBean`

    - #### setLargeRequestMaxBytes

          public void setLargeRequestMaxBytes(int bytes)

      Specified by:
        `setLargeRequestMaxBytes` in interface `ZooKeeperServerMXBean`

    - #### getLargeRequestThreshold

          public int getLargeRequestThreshold()

      Specified by:
        `getLargeRequestThreshold` in interface `ZooKeeperServerMXBean`

    - #### setLargeRequestThreshold

          public void setLargeRequestThreshold(int threshold)

      Specified by:
        `setLargeRequestThreshold` in interface `ZooKeeperServerMXBean`

    - #### getMaxCnxns

          public int getMaxCnxns()

      Specified by:
        `getMaxCnxns` in interface `ZooKeeperServerMXBean`
      Returns:
        Current maxCnxns allowed to a single ZooKeeper server

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