Class QuorumVote<V extends Vote,T>
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVote<V,T>
-
- Direct Known Subclasses:
QuorumVoteServerConnect
public abstract class QuorumVote<V extends Vote,T> extends Object
the vote itself. the vote can be decided by the enquirer or sent out to each node in the quorum.
-
-
Constructor Summary
Constructors Constructor Description QuorumVote(SimpleString name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidallVotesCast(Topology voteTopology)called by theQuorumManagerwhen all the votes have been cast and received.abstract Voteconnected()called by theQuorumManagerwhen one of the nodes in the quorum is successfully connected to.abstract TgetDecision()get the decion of the voteSimpleStringgetName()the name of this quorum vote, used for identifying the correctQuorumVoteHandlerabstract VotenotConnected()called by theQuorumManagerfails to connect to a node in the quorum.abstract voidvote(V vote)called by theQuorumManagerwhen a vote can be made, either from the cluster or decided by itself.
-
-
-
Constructor Detail
-
QuorumVote
public QuorumVote(SimpleString name)
-
-
Method Detail
-
connected
public abstract Vote connected()
called by theQuorumManagerwhen one of the nodes in the quorum is successfully connected to. The QuorumVote can then decide whether or not a decision can be made with just that information.- Returns:
- the vote to use
-
notConnected
public abstract Vote notConnected()
called by theQuorumManagerfails to connect to a node in the quorum. The QuorumVote can then decide whether or not a decision can be made with just that information however the node cannot cannot be asked.- Returns:
- the vote to use
-
vote
public abstract void vote(V vote)
called by theQuorumManagerwhen a vote can be made, either from the cluster or decided by itself.- Parameters:
vote- the vote to make.
-
getDecision
public abstract T getDecision()
get the decion of the vote- Returns:
- the voting decision
-
allVotesCast
public abstract void allVotesCast(Topology voteTopology)
called by theQuorumManagerwhen all the votes have been cast and received.- Parameters:
voteTopology- the topology of where the votes were sent.
-
getName
public SimpleString getName()
the name of this quorum vote, used for identifying the correctQuorumVoteHandler- Returns:
- the name of the wuorum vote
-
-