Package org.apache.solr.cloud
Class ElectionContext
java.lang.Object
org.apache.solr.cloud.ElectionContext
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionElectionContext(String coreNodeName, String electionPath, String leaderPath, org.apache.solr.common.cloud.ZkNodeProps leaderProps, org.apache.solr.common.cloud.SolrZkClient zkClient) -
Method Summary
-
Constructor Details
-
ElectionContext
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
cancelElection
- Throws:
InterruptedExceptionorg.apache.zookeeper.KeeperException
-
checkIfIamLeaderFired
public void checkIfIamLeaderFired() -
joinedElectionFired
public void joinedElectionFired() -
copy
Create a new instance when retrying the election.This carries over all election parameters, but not current status (mostly the
SyncStrategyis not copied for shared leader election.
-