public class QuorumMaj extends Object implements QuorumVerifier
| Constructor and Description |
|---|
QuorumMaj(int n)
Defines a majority to avoid computing it every time.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsQuorum(HashSet<Long> set)
Verifies if a set is a majority.
|
long |
getWeight(long id)
Returns weight of 1 by default.
|
public QuorumMaj(int n)
n - number of serverspublic long getWeight(long id)
getWeight in interface QuorumVerifierid - public boolean containsQuorum(HashSet<Long> set)
containsQuorum in interface QuorumVerifierCopyright © 2014 The Apache Software Foundation