|
Berkeley DB Java Edition version 5.0.34 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QuorumPolicy>
com.sleepycat.je.rep.QuorumPolicy
public enum QuorumPolicy
The quorum policy determine the number of nodes that must participate to
pick the winner of an election, and therefore the master of the group.
The default quorum policy during the lifetime of the group is
QuorumPolicy.SIMPLE_MAJORITY. The only time that the application needs to
specify a specific quorum policy is at node startup time, by passing one
to the ReplicatedEnvironment
constructor.
Enum Constant Summary | |
---|---|
ALL
All participants are required to vote. |
|
SIMPLE_MAJORITY
A simple majority of participants is required to vote. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final QuorumPolicy ALL
public static final QuorumPolicy SIMPLE_MAJORITY
Method Detail |
---|
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 name
NullPointerException
- if the argument is nullpublic int quorumSize(int groupSize)
groupSize
- the size of the replication group.
|
Berkeley DB Java Edition version 5.0.34 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |