org.apache.zookeeper.server.quorum
Class LeaderElection

java.lang.Object
  extended by org.apache.zookeeper.server.quorum.LeaderElection
All Implemented Interfaces:
Election

Deprecated. This class has been deprecated as of release 3.4.0.

@Deprecated
public class LeaderElection
extends Object
implements Election


Nested Class Summary
protected static class LeaderElection.ElectionResult
          Deprecated.  
 
Field Summary
protected static Random epochGen
          Deprecated.  
protected  QuorumPeer self
          Deprecated.  
 
Constructor Summary
LeaderElection(QuorumPeer self)
          Deprecated.  
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

epochGen

protected static final Random epochGen
Deprecated. 

self

protected QuorumPeer self
Deprecated. 
Constructor Detail

LeaderElection

public LeaderElection(QuorumPeer self)
Deprecated. 
Method Detail

countVotes

protected LeaderElection.ElectionResult countVotes(HashMap<InetSocketAddress,Vote> votes,
                                                   HashSet<Long> heardFrom)
Deprecated. 

shutdown

public void shutdown()
Deprecated. 
There is nothing to shutdown in this implementation of leader election, so we simply have an empty method.

Specified by:
shutdown in interface Election

lookForLeader

public Vote lookForLeader()
                   throws InterruptedException
Deprecated. 
Invoked in QuorumPeer to find or elect a new leader.

Specified by:
lookForLeader in interface Election
Throws:
InterruptedException


Copyright © 2011 The Apache Software Foundation