public static class QuorumPeer.QuorumServer extends Object
Modifier and Type | Field and Description |
---|---|
InetSocketAddress |
addr |
InetSocketAddress |
electionAddr |
int |
electionPort |
String |
hostname |
long |
id |
int |
port |
QuorumPeer.LearnerType |
type |
Constructor and Description |
---|
QuorumPeer.QuorumServer(long id,
String hostname,
Integer port,
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 InetSocketAddress addr
public InetSocketAddress electionAddr
public String hostname
public int port
public int electionPort
public long id
public QuorumPeer.LearnerType type
public QuorumPeer.QuorumServer(long id, String hostname, Integer port, Integer electionPort, QuorumPeer.LearnerType type)
public void recreateSocketAddresses()
Copyright © 2016 The Apache Software Foundation