public enum QuorumPolicy extends java.lang.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(java.lang.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(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int quorumSize(int groupSize)
groupSize
- the number of election participants in the replication
groupgroupSize
number of election participantsCopyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.