public static class QuorumPeer.QuorumServer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.net.InetSocketAddress |
addr |
java.net.InetSocketAddress |
electionAddr |
int |
electionPort |
java.lang.String |
hostname |
long |
id |
int |
port |
QuorumPeer.LearnerType |
type |
Constructor and Description |
---|
QuorumPeer.QuorumServer(long id,
java.net.InetSocketAddress addr) |
QuorumPeer.QuorumServer(long id,
java.lang.String hostname,
java.lang.Integer port,
java.lang.Integer electionPort,
QuorumPeer.LearnerType type) |
Modifier and Type | Method and Description |
---|---|
void |
recreateSocketAddresses()
Performs a DNS lookup of hostname and (re)creates the this.addr and
this.electionAddr InetSocketAddress objects as appropriate
If the DNS lookup fails, this.addr and electionAddr remain
unmodified, unless they were never set.
|
public java.net.InetSocketAddress addr
public java.net.InetSocketAddress electionAddr
public java.lang.String hostname
public int port
public int electionPort
public long id
public QuorumPeer.LearnerType type
public QuorumPeer.QuorumServer(long id, java.net.InetSocketAddress addr)
public QuorumPeer.QuorumServer(long id, java.lang.String hostname, java.lang.Integer port, java.lang.Integer electionPort, QuorumPeer.LearnerType type)
public void recreateSocketAddresses()
Copyright © 2018 The Apache Software Foundation