public class QuorumMaj extends java.lang.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(java.util.HashSet<java.lang.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(java.util.HashSet<java.lang.Long> set)
containsQuorum in interface QuorumVerifierCopyright © 2016 The Apache Software Foundation