public class QuorumVoteServerConnect extends QuorumVote<BooleanVote,Boolean>
| Constructor and Description |
|---|
QuorumVoteServerConnect(int size,
StorageManager storageManager)
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
|
SimpleString |
getName()
the name of this quorum vote, used for identifying the correct
QuorumVoteHandler |
Vote |
notConnected()
if we cant connect to the node
|
void |
vote(BooleanVote 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
|
public QuorumVoteServerConnect(int size,
StorageManager storageManager)
public Vote connected()
connected in class QuorumVote<BooleanVote,Boolean>public Vote notConnected()
notConnected in class QuorumVote<BooleanVote,Boolean>public void vote(BooleanVote vote)
vote in class QuorumVote<BooleanVote,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<BooleanVote,Boolean>voteTopology - the topology of where the votes were sent.public Boolean getDecision()
QuorumVotegetDecision in class QuorumVote<BooleanVote,Boolean>public SimpleString getName()
QuorumVoteQuorumVoteHandlergetName in class QuorumVote<BooleanVote,Boolean>public void await(int latchTimeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.