Class QuorumOracleMaj
- java.lang.Object
-
- org.apache.zookeeper.server.quorum.flexible.QuorumMaj
-
- org.apache.zookeeper.server.quorum.flexible.QuorumOracleMaj
-
- All Implemented Interfaces:
QuorumVerifier
public class QuorumOracleMaj extends QuorumMaj
-
-
Constructor Summary
Constructors Constructor Description QuorumOracleMaj(Map<Long,QuorumPeer.QuorumServer> allMembers, String oraclePath)
QuorumOracleMaj(Properties props, String oraclePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
askOracle()
boolean
containsQuorum(Set<Long> ackSet)
Verifies if a set is a majority.boolean
equals(Object o)
boolean
getNeedOracle()
String
getOraclePath()
int
hashCode()
boolean
overrideQuorumDecision(List<LearnerHandler> forwardingFollowers)
boolean
revalidateOutstandingProp(Leader self, ArrayList<Leader.Proposal> outstandingProposal, long lastCommitted)
boolean
revalidateVoteset(SyncedLearnerTracker voteSet, boolean timeout)
boolean
updateNeedOracle(List<LearnerHandler> forwardingFollowers)
-
Methods inherited from class org.apache.zookeeper.server.quorum.flexible.QuorumMaj
getAllMembers, getObservingMembers, getVersion, getVotingMembers, getWeight, setVersion, toString
-
-
-
-
Constructor Detail
-
QuorumOracleMaj
public QuorumOracleMaj(Map<Long,QuorumPeer.QuorumServer> allMembers, String oraclePath)
-
QuorumOracleMaj
public QuorumOracleMaj(Properties props, String oraclePath) throws QuorumPeerConfig.ConfigException
- Throws:
QuorumPeerConfig.ConfigException
-
-
Method Detail
-
updateNeedOracle
public boolean updateNeedOracle(List<LearnerHandler> forwardingFollowers)
-
askOracle
public boolean askOracle()
-
getNeedOracle
public boolean getNeedOracle()
-
getOraclePath
public String getOraclePath()
-
overrideQuorumDecision
public boolean overrideQuorumDecision(List<LearnerHandler> forwardingFollowers)
-
revalidateOutstandingProp
public boolean revalidateOutstandingProp(Leader self, ArrayList<Leader.Proposal> outstandingProposal, long lastCommitted)
-
revalidateVoteset
public boolean revalidateVoteset(SyncedLearnerTracker voteSet, boolean timeout)
-
containsQuorum
public boolean containsQuorum(Set<Long> ackSet)
Description copied from class:QuorumMaj
Verifies if a set is a majority. Assumes that ackSet contains acks only from votingMembers- Specified by:
containsQuorum
in interfaceQuorumVerifier
- Overrides:
containsQuorum
in classQuorumMaj
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceQuorumVerifier
- Overrides:
equals
in classQuorumMaj
-
-