Modifier and Type | Class | Description |
---|---|---|
protected static class |
LeaderElection.ElectionResult |
Deprecated.
|
Modifier and Type | Field | Description |
---|---|---|
protected static java.util.Random |
epochGen |
Deprecated.
|
protected QuorumPeer |
self |
Deprecated.
|
Constructor | Description |
---|---|
LeaderElection(QuorumPeer self) |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
protected LeaderElection.ElectionResult |
countVotes(java.util.HashMap<java.net.InetSocketAddress,Vote> votes,
java.util.HashSet<java.lang.Long> heardFrom) |
Deprecated.
|
Vote |
lookForLeader() |
Deprecated.
Invoked in QuorumPeer to find or elect a new leader.
|
void |
shutdown() |
Deprecated.
There is nothing to shutdown in this implementation of
leader election, so we simply have an empty method.
|
protected static final java.util.Random epochGen
protected QuorumPeer self
public LeaderElection(QuorumPeer self)
protected LeaderElection.ElectionResult countVotes(java.util.HashMap<java.net.InetSocketAddress,Vote> votes, java.util.HashSet<java.lang.Long> heardFrom)
public void shutdown()
public Vote lookForLeader() throws java.lang.InterruptedException
lookForLeader
in interface Election
java.lang.InterruptedException
Copyright © 2018 The Apache Software Foundation