public class QuorumVoteServerConnect extends QuorumVote<ServerConnectVote,Boolean>
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
LIVE_FAILOVER_VOTE |
| Constructor and Description |
|---|
QuorumVoteServerConnect(int size,
String targetNodeId) |
QuorumVoteServerConnect(int size,
String targetNodeId,
boolean requestToStayLive)
live nodes | remaining nodes | majority | votes needed
1 | 0 | 0 | 0
2 | 1 | 1 | 1
n | r = n-1 | n/2 + 1 | n/2 + 1 rounded
3 | 2 | 2.5 | 2
4 | 3 | 3 | 3
5 | 4 | 3.5 | 3
6 | 5 | 4 | 4
|
| Modifier and Type | Method and Description |
|---|---|
void |
allVotesCast(Topology voteTopology)
called by the
QuorumManager when all the votes have been cast and received. |
void |
await(int latchTimeout,
TimeUnit unit) |
Vote |
connected()
if we can connect to a node
|
Boolean |
getDecision()
get the decion of the vote
|
boolean |
isRequestToStayLive() |
Vote |
notConnected()
if we cant connect to the node
|
void |
vote(ServerConnectVote vote)
live nodes | remaining nodes | majority | votes needed
1 | 0 | 0 | 0
2 | 1 | 1 | 1
n | r = n-1 | n/2 + 1 | n/2 + 1 rounded
3 | 2 | 2.5 | 2
4 | 3 | 3 | 3
5 | 4 | 3.5 | 3
6 | 5 | 4 | 4
|
getNamepublic static final SimpleString LIVE_FAILOVER_VOTE
public QuorumVoteServerConnect(int size,
String targetNodeId,
boolean requestToStayLive)
public QuorumVoteServerConnect(int size,
String targetNodeId)
public Vote connected()
connected in class QuorumVote<ServerConnectVote,Boolean>public Vote notConnected()
notConnected in class QuorumVote<ServerConnectVote,Boolean>public void vote(ServerConnectVote vote)
vote in class QuorumVote<ServerConnectVote,Boolean>vote - the vote to make.public void allVotesCast(Topology voteTopology)
QuorumVoteQuorumManager when all the votes have been cast and received.allVotesCast in class QuorumVote<ServerConnectVote,Boolean>voteTopology - the topology of where the votes were sent.public Boolean getDecision()
QuorumVotegetDecision in class QuorumVote<ServerConnectVote,Boolean>public void await(int latchTimeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionpublic boolean isRequestToStayLive()
Copyright © 2019 JBoss by Red Hat. All rights reserved.