@Deprecated public class LeaderElection extends Object implements Election
| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
LeaderElection.ElectionResult
Deprecated.  
  | 
| Modifier and Type | Field and Description | 
|---|---|
protected static Random | 
epochGen
Deprecated.  
  | 
protected QuorumPeer | 
self
Deprecated.  
  | 
| Constructor and Description | 
|---|
LeaderElection(QuorumPeer self)
Deprecated.  
  | 
| Modifier and Type | Method and Description | 
|---|---|
protected LeaderElection.ElectionResult | 
countVotes(HashMap<InetSocketAddress,Vote> votes,
          HashSet<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 Random epochGen
protected QuorumPeer self
public LeaderElection(QuorumPeer self)
protected LeaderElection.ElectionResult countVotes(HashMap<InetSocketAddress,Vote> votes, HashSet<Long> heardFrom)
public void shutdown()
public Vote lookForLeader() throws InterruptedException
lookForLeader in interface ElectionInterruptedExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.