Class ElectionContext

java.lang.Object
org.apache.solr.cloud.ElectionContext
All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class ElectionContext extends Object implements Closeable
  • Constructor Details

    • ElectionContext

      public ElectionContext(String coreNodeName, String electionPath, String leaderPath, org.apache.solr.common.cloud.ZkNodeProps leaderProps, org.apache.solr.common.cloud.SolrZkClient zkClient)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • cancelElection

      public void cancelElection() throws InterruptedException, org.apache.zookeeper.KeeperException
      Throws:
      InterruptedException
      org.apache.zookeeper.KeeperException
    • checkIfIamLeaderFired

      public void checkIfIamLeaderFired()
    • joinedElectionFired

      public void joinedElectionFired()
    • copy

      public ElectionContext copy()
      Create a new instance when retrying the election.

      This carries over all election parameters, but not current status (mostly the SyncStrategy is not copied for shared leader election.