Package io.microraft.report
Enum RaftNodeReport.RaftNodeReportReason
- java.lang.Object
-
- java.lang.Enum<RaftNodeReport.RaftNodeReportReason>
-
- io.microraft.report.RaftNodeReport.RaftNodeReportReason
-
- All Implemented Interfaces:
Serializable
,Comparable<RaftNodeReport.RaftNodeReportReason>
- Enclosing interface:
- RaftNodeReport
public static enum RaftNodeReport.RaftNodeReportReason extends Enum<RaftNodeReport.RaftNodeReportReason>
Denotes the reason for a given report
-
-
Enum Constant Summary
Enum Constants Enum Constant Description API_CALL
The report is created for aRaftNode.getReport()
call.GROUP_MEMBERS_CHANGE
The report is created when aRaftNode
moves to a new Raft group member list.INSTALL_SNAPSHOT
The report is created when aRaftNode
installs a snapshot that is sent by the currentRaftRole.LEADER
.PERIODIC
The report is created on a periodic reporting tick of theRaftNode
.ROLE_CHANGE
The report is created on when aRaftNode
changes its role or discovers the leader in the current term.STATUS_CHANGE
The report is created when aRaftNode
changes itsRaftNodeStatus
.TAKE_SNAPSHOT
The report is created when aRaftNode
takes a snapshot of theStateMachine
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RaftNodeReport.RaftNodeReportReason
valueOf(String name)
Returns the enum constant of this type with the specified name.static RaftNodeReport.RaftNodeReportReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PERIODIC
public static final RaftNodeReport.RaftNodeReportReason PERIODIC
The report is created on a periodic reporting tick of theRaftNode
.
-
STATUS_CHANGE
public static final RaftNodeReport.RaftNodeReportReason STATUS_CHANGE
The report is created when aRaftNode
changes itsRaftNodeStatus
.
-
ROLE_CHANGE
public static final RaftNodeReport.RaftNodeReportReason ROLE_CHANGE
The report is created on when aRaftNode
changes its role or discovers the leader in the current term.
-
GROUP_MEMBERS_CHANGE
public static final RaftNodeReport.RaftNodeReportReason GROUP_MEMBERS_CHANGE
The report is created when aRaftNode
moves to a new Raft group member list.
-
TAKE_SNAPSHOT
public static final RaftNodeReport.RaftNodeReportReason TAKE_SNAPSHOT
The report is created when aRaftNode
takes a snapshot of theStateMachine
-
INSTALL_SNAPSHOT
public static final RaftNodeReport.RaftNodeReportReason INSTALL_SNAPSHOT
The report is created when aRaftNode
installs a snapshot that is sent by the currentRaftRole.LEADER
.
-
API_CALL
public static final RaftNodeReport.RaftNodeReportReason API_CALL
The report is created for aRaftNode.getReport()
call.
-
-
Method Detail
-
values
public static RaftNodeReport.RaftNodeReportReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RaftNodeReport.RaftNodeReportReason c : RaftNodeReport.RaftNodeReportReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RaftNodeReport.RaftNodeReportReason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-