Class QuorumVoteServerConnect
java.lang.Object
org.apache.activemq.artemis.core.server.cluster.quorum.QuorumVote<ServerConnectVote,Boolean>
org.apache.activemq.artemis.core.server.cluster.quorum.QuorumVoteServerConnect
A Quorum Vote for deciding if a replicated backup should become live.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleStringstatic final SimpleStringNOTE: The following String is used to identify the targetNode implementation at other servers. -
Constructor Summary
ConstructorsConstructorDescriptionQuorumVoteServerConnect(int size, String targetNodeId) QuorumVoteServerConnect(int size, String targetNodeId, boolean requestToStayActive, String connector) active nodes | remaining nodes | majority | votes needed 1 | 0 | 0 | 0 2 | 1 | 1 | 1 3 | 2 | 2.5 | 2 4 | 3 | 3 | 3 5 | 4 | 3.5 | 3 6 | 5 | 4 | 4 n | n-1 | n/2 + 1 | n/2 + 1 rounded -
Method Summary
Modifier and TypeMethodDescriptionvoidallVotesCast(Topology voteTopology) called by theQuorumManagerwhen all the votes have been cast and received.voidif we can connect to a nodeget the decion of the votebooleanif we cant connect to the nodevoidvote(ServerConnectVote vote) active nodes | remaining nodes | majority | votes needed 1 | 0 | 0 | 0 2 | 1 | 1 | 1 3 | 2 | 2.5 | 2 4 | 3 | 3 | 3 5 | 4 | 3.5 | 3 6 | 5 | 4 | 4 n | n-1 | n/2 + 1 | n/2 + 1 roundedMethods inherited from class org.apache.activemq.artemis.core.server.cluster.quorum.QuorumVote
getName, getOldName
-
Field Details
-
PRIMARY_FAILOVER_VOTE
NOTE: The following String is used to identify the targetNode implementation at other servers. Renaming such string would cause incompatibility changes. -
OLD_PRIMARY_FAILOVER_VOTE
-
-
Constructor Details
-
QuorumVoteServerConnect
public QuorumVoteServerConnect(int size, String targetNodeId, boolean requestToStayActive, String connector) active nodes | remaining nodes | majority | votes needed 1 | 0 | 0 | 0 2 | 1 | 1 | 1 3 | 2 | 2.5 | 2 4 | 3 | 3 | 3 5 | 4 | 3.5 | 3 6 | 5 | 4 | 4 n | n-1 | n/2 + 1 | n/2 + 1 rounded -
QuorumVoteServerConnect
-
-
Method Details
-
connected
if we can connect to a node- Specified by:
connectedin classQuorumVote<ServerConnectVote,Boolean> - Returns:
- the vote to use
-
notConnected
if we cant connect to the node- Specified by:
notConnectedin classQuorumVote<ServerConnectVote,Boolean> - Returns:
- the vote to use
-
vote
active nodes | remaining nodes | majority | votes needed 1 | 0 | 0 | 0 2 | 1 | 1 | 1 3 | 2 | 2.5 | 2 4 | 3 | 3 | 3 5 | 4 | 3.5 | 3 6 | 5 | 4 | 4 n | n-1 | n/2 + 1 | n/2 + 1 rounded- Specified by:
votein classQuorumVote<ServerConnectVote,Boolean> - Parameters:
vote- the vote to make.
-
allVotesCast
Description copied from class:QuorumVotecalled by theQuorumManagerwhen all the votes have been cast and received.- Specified by:
allVotesCastin classQuorumVote<ServerConnectVote,Boolean> - Parameters:
voteTopology- the topology of where the votes were sent.
-
getDecision
Description copied from class:QuorumVoteget the decion of the vote- Specified by:
getDecisionin classQuorumVote<ServerConnectVote,Boolean> - Returns:
- the voting decision
-
await
- Throws:
InterruptedException
-
isRequestToStayActive
public boolean isRequestToStayActive()
-