public enum QuorumPolicy extends Enum<QuorumPolicy>
ReplicatedEnvironment constructor.
Note that NodeType.SECONDARY nodes are not counted as part of
master election quorums.
| Enum Constant and Description |
|---|
ALL
All participants are required to vote.
|
SIMPLE_MAJORITY
A simple majority of participants is required to vote.
|
| Modifier and Type | Method and Description |
|---|---|
int |
quorumSize(int groupSize)
Returns the minimum number of nodes to needed meet the quorum policy.
|
static QuorumPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static QuorumPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final QuorumPolicy ALL
public static final QuorumPolicy SIMPLE_MAJORITY
public static QuorumPolicy[] values()
for (QuorumPolicy c : QuorumPolicy.values()) System.out.println(c);
public static QuorumPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int quorumSize(int groupSize)
groupSize - the number of election participants in the replication
groupgroupSize number of election participantsCopyright © 2024. All rights reserved.