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_CALLThe report is created for aRaftNode.getReport()call.GROUP_MEMBERS_CHANGEThe report is created when aRaftNodemoves to a new Raft group member list.INSTALL_SNAPSHOTThe report is created when aRaftNodeinstalls a snapshot that is sent by the currentRaftRole.LEADER.PERIODICThe report is created on a periodic reporting tick of theRaftNode.ROLE_CHANGEThe report is created on when aRaftNodechanges its role or discovers the leader in the current term.STATUS_CHANGEThe report is created when aRaftNodechanges itsRaftNodeStatus.TAKE_SNAPSHOTThe report is created when aRaftNodetakes a snapshot of theStateMachine
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RaftNodeReport.RaftNodeReportReasonvalueOf(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 aRaftNodechanges itsRaftNodeStatus.
-
ROLE_CHANGE
public static final RaftNodeReport.RaftNodeReportReason ROLE_CHANGE
The report is created on when aRaftNodechanges 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 aRaftNodemoves to a new Raft group member list.
-
TAKE_SNAPSHOT
public static final RaftNodeReport.RaftNodeReportReason TAKE_SNAPSHOT
The report is created when aRaftNodetakes a snapshot of theStateMachine
-
INSTALL_SNAPSHOT
public static final RaftNodeReport.RaftNodeReportReason INSTALL_SNAPSHOT
The report is created when aRaftNodeinstalls 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
-
-