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

org.apache.zookeeper.server.quorum

## Interface LocalPeerMXBean

- All Superinterfaces:
    ServerMXBean
  All Known Implementing Classes:
    LocalPeerBean

      public interface LocalPeerMXBean
      extends ServerMXBean

  A local zookeeper server MBean interface. Unlike the remote peer, the local peer provides complete state/statistics at runtime and can be managed (just like a standalone zookeeper server).

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClientAddress()`
    `long` | `getConfigVersion()`
    `String` | `getElectionAddress()`
    `int` | `getElectionType()`
    `int` | `getInitLimit()`
    `String` | `getLearnerType()`
    `int` | `getMaxClientCnxnsPerHost()` Current maxClientCnxns allowed from a particular host
    `int` | `getMaxCnxns()`
    `int` | `getMaxSessionTimeout()`
    `int` | `getMinSessionTimeout()`
    `String` | `getQuorumAddress()`
    `String` | `getQuorumSystemInfo()`
    `String` | `getState()`
    `int` | `getSyncLimit()`
    `int` | `getTick()`
    `int` | `getTickTime()`
    `boolean` | `isLeader()`
    `boolean` | `isPartOfEnsemble()`
    `void` | `setInitLimit(int initLimit)` Set the number of ticks that the initial sync phase can take
    `void` | `setSyncLimit(int syncLimit)` Set the number of ticks that can pass between sending a request and getting a acknowledgment

    - ### Methods inherited from interface org.apache.zookeeper.server.quorum.ServerMXBean

      `getName, getStartTime`

- - ### Method Detail

    - #### getTickTime

          int getTickTime()

      Returns:
        the number of milliseconds of each tick

    - #### getMaxClientCnxnsPerHost

          int getMaxClientCnxnsPerHost()

      Current maxClientCnxns allowed from a particular host

    - #### getMinSessionTimeout

          int getMinSessionTimeout()

      Returns:
        the minimum number of milliseconds allowed for a session timeout

    - #### getMaxSessionTimeout

          int getMaxSessionTimeout()

      Returns:
        the maximum number of milliseconds allowed for a session timeout

    - #### getInitLimit

          int getInitLimit()

      Returns:
        the number of ticks that the initial sync phase can take

    - #### getSyncLimit

          int getSyncLimit()

      Returns:
        the number of ticks that can pass between sending a request and getting a acknowledgment

    - #### setInitLimit

          void setInitLimit(int initLimit)

      Set the number of ticks that the initial sync phase can take

    - #### setSyncLimit

          void setSyncLimit(int syncLimit)

      Set the number of ticks that can pass between sending a request and getting a acknowledgment

    - #### getTick

          int getTick()

      Returns:
        the current tick

    - #### getState

          String getState()

      Returns:
        the current server state

    - #### getQuorumAddress

          String getQuorumAddress()

      Returns:
        the quorum address

    - #### getElectionType

          int getElectionType()

      Returns:
        the election type

    - #### getElectionAddress

          String getElectionAddress()

      Returns:
        the election address

    - #### getClientAddress

          String getClientAddress()

      Returns:
        the client address

    - #### getLearnerType

          String getLearnerType()

      Returns:
        the learner type

    - #### getConfigVersion

          long getConfigVersion()

      Returns:
        the config version

    - #### getQuorumSystemInfo

          String getQuorumSystemInfo()

      Returns:
        the quorum system information

    - #### isPartOfEnsemble

          boolean isPartOfEnsemble()

      Returns:
        true if quorum peer is part of the ensemble, false otherwise

    - #### isLeader

          boolean isLeader()

      Returns:
        true if the peer is the current leader

    - #### getMaxCnxns

          int getMaxCnxns()

      Returns:
        Current maxCnxns allowed to a single ZooKeeper server

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