public enum ClusterRole extends Enum<ClusterRole>
| Enum Constant and Description |
|---|
FOLLOWER
raft mode follower
|
LEADER
raft mode leader
|
LEARNER
raft mode learner
|
MEMBER
cluster mode member
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRoleCode() |
void |
setRoleCode(int roleCode) |
static ClusterRole |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClusterRole[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClusterRole LEADER
public static final ClusterRole FOLLOWER
public static final ClusterRole LEARNER
public static final ClusterRole MEMBER
public static ClusterRole[] values()
for (ClusterRole c : ClusterRole.values()) System.out.println(c);
public static ClusterRole 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 int getRoleCode()
public void setRoleCode(int roleCode)
Copyright © 2023 Seata. All rights reserved.