QuorumPeer.QuorumServer (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.quorum

## Class QuorumPeer.QuorumServer

- java.lang.Object
- - org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer

- Enclosing class:
    QuorumPeer

      public static class QuorumPeer.QuorumServer
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `MultipleAddresses` | `addr`
    `InetSocketAddress` | `clientAddr`
    `MultipleAddresses` | `electionAddr`
    `String` | `hostname`
    `long` | `id`
    `boolean` | `isClientAddrFromStatic`
    `QuorumPeer.LearnerType` | `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QuorumServer(long id, InetSocketAddress addr)`
    `QuorumServer(long id, InetSocketAddress addr, InetSocketAddress electionAddr)`
    `QuorumServer(long id, InetSocketAddress addr, InetSocketAddress electionAddr, InetSocketAddress clientAddr)`
    `QuorumServer(long id, InetSocketAddress addr, InetSocketAddress electionAddr, InetSocketAddress clientAddr, QuorumPeer.LearnerType type)`
    `QuorumServer(long id, InetSocketAddress addr, InetSocketAddress electionAddr, QuorumPeer.LearnerType type)`
    `QuorumServer(long sid, String addressStr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkAddressDuplicate(QuorumPeer.QuorumServer s)`
    `static String` | `delimitedHostString(InetSocketAddress addr)`
    `boolean` | `equals(Object o)`
    `long` | `getId()`
    `int` | `hashCode()`
    `void` | `recreateSocketAddresses()` Performs a DNS lookup for server address and election address.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### addr

          public MultipleAddresses addr

    - #### electionAddr

          public MultipleAddresses electionAddr

    - #### clientAddr

          public InetSocketAddress clientAddr

    - #### id

          public long id

    - #### hostname

          public String hostname

    - #### type

          public QuorumPeer.LearnerType type

    - #### isClientAddrFromStatic

          public boolean isClientAddrFromStatic

  - ### Constructor Detail

    - #### QuorumServer

          public QuorumServer(long id,
                              InetSocketAddress addr,
                              InetSocketAddress electionAddr,
                              InetSocketAddress clientAddr)

    - #### QuorumServer

          public QuorumServer(long id,
                              InetSocketAddress addr,
                              InetSocketAddress electionAddr)

    - #### QuorumServer

          public QuorumServer(long id,
                              InetSocketAddress addr)

    - #### QuorumServer

          public QuorumServer(long sid,
                              String addressStr)
                       throws QuorumPeerConfig.ConfigException

      Throws:
        `QuorumPeerConfig.ConfigException`

    - #### QuorumServer

          public QuorumServer(long id,
                              InetSocketAddress addr,
                              InetSocketAddress electionAddr,
                              QuorumPeer.LearnerType type)

    - #### QuorumServer

          public QuorumServer(long id,
                              InetSocketAddress addr,
                              InetSocketAddress electionAddr,
                              InetSocketAddress clientAddr,
                              QuorumPeer.LearnerType type)

  - ### Method Detail

    - #### getId

          public long getId()

    - #### recreateSocketAddresses

          public void recreateSocketAddresses()

      Performs a DNS lookup for server address and election address. If the DNS lookup fails, this.addr and electionAddr remain unmodified.

    - #### delimitedHostString

          public static String delimitedHostString(InetSocketAddress addr)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### checkAddressDuplicate

          public void checkAddressDuplicate(QuorumPeer.QuorumServer s)
                                     throws KeeperException.BadArgumentsException

      Throws:
        `KeeperException.BadArgumentsException`

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