public enum RaftRole extends Enum<RaftRole>
Enum Constant and Description |
---|
CANDIDATE
Candidate is used to elect a new leader.
|
FOLLOWER
Followers are passive, they issue no requests on their own
but simply respond to requests from leaders and candidates.
|
LEADER
The leader handles all client requests (append entry, membership change,
etc.) and replicates them to followers.
|
Modifier and Type | Method and Description |
---|---|
static RaftRole |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RaftRole[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RaftRole FOLLOWER
public static final RaftRole CANDIDATE
public static final RaftRole LEADER
public static RaftRole[] values()
for (RaftRole c : RaftRole.values()) System.out.println(c);
public static RaftRole 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 nullCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.