public enum State extends Enum<State>
| Enum Constant and Description |
|---|
STATE_CANDIDATE |
STATE_END |
STATE_ERROR |
STATE_FOLLOWER |
STATE_LEADER |
STATE_SHUTDOWN |
STATE_SHUTTING |
STATE_TRANSFERRING |
STATE_UNINITIALIZED |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isActive() |
static State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final State STATE_LEADER
public static final State STATE_TRANSFERRING
public static final State STATE_CANDIDATE
public static final State STATE_FOLLOWER
public static final State STATE_ERROR
public static final State STATE_UNINITIALIZED
public static final State STATE_SHUTTING
public static final State STATE_SHUTDOWN
public static final State STATE_END
public static State[] values()
for (State c : State.values()) System.out.println(c);
public static State 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 boolean isActive()
Copyright © 2024. All rights reserved.