public static enum RaftResponse.Status extends Enum<RaftResponse.Status>
| Enum Constant and Description |
|---|
ERROR
Indicates a response containing an error.
|
OK
Indicates a successful response status.
|
| Modifier and Type | Method and Description |
|---|---|
static RaftResponse.Status |
forId(int id)
Returns the status for the given identifier.
|
byte |
id()
Returns the status identifier.
|
static RaftResponse.Status |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RaftResponse.Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RaftResponse.Status OK
public static final RaftResponse.Status ERROR
public static RaftResponse.Status[] values()
for (RaftResponse.Status c : RaftResponse.Status.values()) System.out.println(c);
public static RaftResponse.Status 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 static RaftResponse.Status forId(int id)
id - The status identifier.IllegalArgumentException - if id is not 0 or 1public byte id()
Copyright © 2013–2017. All rights reserved.