Class ZooKeeperServerConfig

java.lang.Object
com.linecorp.centraldogma.server.ZooKeeperServerConfig

public final class ZooKeeperServerConfig extends Object
Represents the address and port numbers of a ZooKeeper node.
  • Constructor Details

    • ZooKeeperServerConfig

      public ZooKeeperServerConfig(String host, int quorumPort, int electionPort, @Nullable Integer clientPort, @Nullable Integer groupId, @Nullable Integer weight)
      Creates a new instance.
      Parameters:
      host - the IP address or host name of the ZooKeeper server
      quorumPort - the quorum port number
      electionPort - the election port number
      clientPort - the client port number (0-65535)
      groupId - the group ID to use for hierarchical quorums
      weight - the weight of the Zookeeper server
  • Method Details

    • host

      public String host()
      Returns the IP address or host name of the ZooKeeper server.
    • quorumPort

      public int quorumPort()
      Returns the quorum port number.
    • electionPort

      public int electionPort()
      Returns the election port number.
    • clientPort

      public int clientPort()
      Returns the client port number.
    • groupId

      @Nullable public Integer groupId()
      Returns the group ID to use hierarchical quorums.
    • weight

      public int weight()
      Returns the weight of the ZooKeeper server.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object