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

org.apache.zookeeper.server.quorum

## Class LeaderBean

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

- All Implemented Interfaces:
    ZKMBeanInfo, LeaderMXBean, ZooKeeperServerMXBean

      public class LeaderBean
      extends ZooKeeperServerBean
      implements LeaderMXBean

  Leader MBean interface implementation.

- - ### Field Summary

    - ### Fields inherited from class org.apache.zookeeper.server.ZooKeeperServerBean

      `zks`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LeaderBean(Leader leader, ZooKeeperServer zks)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `followerInfo()`
    `String` | `getCurrentZxid()` Current zxid of cluster.
    `long` | `getElectionTimeTaken()`
    `int` | `getLastProposalSize()`
    `int` | `getMaxConcurrentDiffSyncs()`
    `int` | `getMaxConcurrentSnapSyncs()`
    `int` | `getMaxProposalSize()`
    `int` | `getMinProposalSize()`
    `String` | `getName()`
    `String` | `nonVotingFollowerInfo()`
    `void` | `resetProposalStatistics()` Resets statistics of proposal size (min/max/last)
    `void` | `setMaxConcurrentDiffSyncs(int maxConcurrentDiffSyncs)`
    `void` | `setMaxConcurrentSnapSyncs(int maxConcurrentSnapshots)`

    - ### Methods inherited from class org.apache.zookeeper.server.ZooKeeperServerBean

      `getAuthFailedCount, getAvgRequestLatency, getClientPort, getCommitProcMaxCommitBatchSize, getCommitProcMaxReadBatchSize, getConnectionDecreaseRatio, getConnectionDropDecrease, getConnectionDropIncrease, getConnectionFreezeTime, getConnectionMaxTokens, getConnectionTokenFillCount, getConnectionTokenFillTime, getDataDirSize, getFlushDelay, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastClientResponseSize, getLogDirSize, getMaxBatchSize, getMaxClientCnxnsPerHost, getMaxClientResponseSize, getMaxCnxns, getMaxRequestLatency, getMaxSessionTimeout, getMaxWriteQueuePollTime, getMinClientResponseSize, getMinRequestLatency, getMinSessionTimeout, getNonMTLSLocalConnCount, getNonMTLSRemoteConnCount, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getRequestStaleConnectionCheck, getRequestStaleLatencyCheck, getRequestThrottleDropStale, getRequestThrottleLimit, getRequestThrottleStallTime, getResponseCachingEnabled, getSecureClientAddress, getSecureClientPort, getStartTime, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getVersion, isHidden, resetAuthFailedCount, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetNonMTLSConnCount, resetStatistics, setCommitProcMaxCommitBatchSize, setCommitProcMaxReadBatchSize, setConnectionDecreaseRatio, setConnectionDropDecrease, setConnectionDropIncrease, setConnectionFreezeTime, setConnectionMaxTokens, setConnectionTokenFillCount, setConnectionTokenFillTime, setFlushDelay, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxBatchSize, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMaxWriteQueuePollTime, setMinSessionTimeout, setRequestStaleConnectionCheck, setRequestStaleLatencyCheck, setRequestThrottleDropStale, setRequestThrottleLimit, setRequestThrottleStallTime, setResponseCachingEnabled, setThrottledOpWaitTime, setTickTime`

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

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

    - ### Methods inherited from interface org.apache.zookeeper.server.ZooKeeperServerMXBean

      `getAuthFailedCount, getAvgRequestLatency, getClientPort, getCommitProcMaxCommitBatchSize, getCommitProcMaxReadBatchSize, getConnectionDecreaseRatio, getConnectionDropDecrease, getConnectionDropIncrease, getConnectionFreezeTime, getConnectionMaxTokens, getConnectionTokenFillCount, getConnectionTokenFillTime, getDataDirSize, getFlushDelay, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastClientResponseSize, getLogDirSize, getMaxBatchSize, getMaxClientCnxnsPerHost, getMaxClientResponseSize, getMaxCnxns, getMaxRequestLatency, getMaxSessionTimeout, getMaxWriteQueuePollTime, getMinClientResponseSize, getMinRequestLatency, getMinSessionTimeout, getNonMTLSLocalConnCount, getNonMTLSRemoteConnCount, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getRequestStaleConnectionCheck, getRequestStaleLatencyCheck, getRequestThrottleDropStale, getRequestThrottleLimit, getRequestThrottleStallTime, getResponseCachingEnabled, getSecureClientAddress, getSecureClientPort, getStartTime, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getVersion, resetAuthFailedCount, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetNonMTLSConnCount, resetStatistics, setCommitProcMaxCommitBatchSize, setCommitProcMaxReadBatchSize, setConnectionDecreaseRatio, setConnectionDropDecrease, setConnectionDropIncrease, setConnectionFreezeTime, setConnectionMaxTokens, setConnectionTokenFillCount, setConnectionTokenFillTime, setFlushDelay, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxBatchSize, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMaxWriteQueuePollTime, setMinSessionTimeout, setRequestStaleConnectionCheck, setRequestStaleLatencyCheck, setRequestThrottleDropStale, setRequestThrottleLimit, setRequestThrottleStallTime, setResponseCachingEnabled, setThrottledOpWaitTime, setTickTime`

- - ### Constructor Detail

    - #### LeaderBean

          public LeaderBean(Leader leader,
                            ZooKeeperServer zks)

  - ### Method Detail

    - #### getName

          public String getName()

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

    - #### getCurrentZxid

          public String getCurrentZxid()

      Description copied from interface: `LeaderMXBean`
      Current zxid of cluster.
      Specified by:
        `getCurrentZxid` in interface `LeaderMXBean`

    - #### followerInfo

          public String followerInfo()

      Specified by:
        `followerInfo` in interface `LeaderMXBean`
      Returns:
        information on current followers

    - #### nonVotingFollowerInfo

          public String nonVotingFollowerInfo()

      Specified by:
        `nonVotingFollowerInfo` in interface `LeaderMXBean`
      Returns:
        information about current non-voting followers

    - #### getElectionTimeTaken

          public long getElectionTimeTaken()

      Specified by:
        `getElectionTimeTaken` in interface `LeaderMXBean`
      Returns:
        time taken for leader election in milliseconds.

    - #### getLastProposalSize

          public int getLastProposalSize()

      Specified by:
        `getLastProposalSize` in interface `LeaderMXBean`
      Returns:
        size of latest generated proposal

    - #### getMinProposalSize

          public int getMinProposalSize()

      Specified by:
        `getMinProposalSize` in interface `LeaderMXBean`
      Returns:
        size of smallest generated proposal

    - #### getMaxProposalSize

          public int getMaxProposalSize()

      Specified by:
        `getMaxProposalSize` in interface `LeaderMXBean`
      Returns:
        size of largest generated proposal

    - #### resetProposalStatistics

          public void resetProposalStatistics()

      Description copied from interface: `LeaderMXBean`
      Resets statistics of proposal size (min/max/last)
      Specified by:
        `resetProposalStatistics` in interface `LeaderMXBean`

    - #### getMaxConcurrentSnapSyncs

          public int getMaxConcurrentSnapSyncs()

      Specified by:
        `getMaxConcurrentSnapSyncs` in interface `LeaderMXBean`
      Returns:
        Number of concurrent snapshots permitted to send to observers

    - #### setMaxConcurrentSnapSyncs

          public void setMaxConcurrentSnapSyncs(int maxConcurrentSnapshots)

      Specified by:
        `setMaxConcurrentSnapSyncs` in interface `LeaderMXBean`
      Parameters:
        `maxConcurrentSnapshots` - Number of concurrent snapshots permitted to send to observers

    - #### getMaxConcurrentDiffSyncs

          public int getMaxConcurrentDiffSyncs()

      Specified by:
        `getMaxConcurrentDiffSyncs` in interface `LeaderMXBean`
      Returns:
        Number of concurrent diff syncs permitted to send to observers

    - #### setMaxConcurrentDiffSyncs

          public void setMaxConcurrentDiffSyncs(int maxConcurrentDiffSyncs)

      Specified by:
        `setMaxConcurrentDiffSyncs` in interface `LeaderMXBean`
      Parameters:
        `maxConcurrentDiffSyncs` - Number of concurrent diff syncs permitted to send to observers

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