Interface RaftNodeReport
-
public interface RaftNodeReport
Contains information about a Raft node's local state related to the execution of the Raft consensus algorithm.Raft node reports are published either periodically or when there is a change in the local state of a Raft node related to the Raft consensus algorithm. The duration of the periodic report publishing is configured via
RaftConfig.RaftConfigBuilder.setRaftNodeReportPublishPeriodSecs(int)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RaftNodeReport.RaftNodeReportReason
Denotes the reason for a given report
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RaftGroupMembers
getCommittedMembers()
Returns the last committed member list of the Raft group this Raft node belongs to.RaftGroupMembers
getEffectiveMembers()
Returns the currently effective member list of the Raft group this Raft node belongs to.RaftEndpoint
getEndpoint()
Returns the local endpoint of the Raft node.Object
getGroupId()
Returns the unique ID of the Raft group that this Raft node belongs to.RaftGroupMembers
getInitialMembers()
Returns the initial members of the Raft group this Raft node belongs to.RaftLogStats
getLog()
Returns statistics about a Raft node's local Raft log.RaftNodeReport.RaftNodeReportReason
getReason()
RaftRole
getRole()
Returns the role of the Raft node in the current term.RaftNodeStatus
getStatus()
Returns the status of the Raft node.RaftTerm
getTerm()
Returns the locally known term information.
-
-
-
Method Detail
-
getReason
RaftNodeReport.RaftNodeReportReason getReason()
-
getGroupId
@Nonnull Object getGroupId()
Returns the unique ID of the Raft group that this Raft node belongs to.- Returns:
- the unique ID of the Raft group that this Raft node belongs to
-
getEndpoint
@Nonnull RaftEndpoint getEndpoint()
Returns the local endpoint of the Raft node.- Returns:
- the local endpoint of the Raft node
-
getInitialMembers
@Nonnull RaftGroupMembers getInitialMembers()
Returns the initial members of the Raft group this Raft node belongs to.- Returns:
- the initial members of the Raft group this Raft node belongs to
-
getCommittedMembers
@Nonnull RaftGroupMembers getCommittedMembers()
Returns the last committed member list of the Raft group this Raft node belongs to.Please note that the returned member list is read from the local state and can be different from the currently effective applied member list, if there is an ongoing (appended but not-yet committed) membership change in the group. It can be different from the current committed member list of the Raft group, also if a new membership change is committed by other Raft nodes of the group but not learnt by this Raft node yet.
- Returns:
- the last committed member list of the Raft group this Raft node belongs to
-
getEffectiveMembers
@Nonnull RaftGroupMembers getEffectiveMembers()
Returns the currently effective member list of the Raft group this Raft node belongs to.Please note that the returned member list is read from the local state and can be different from the committed member list, if there is an ongoing (appended but not-yet committed) membership change in the Raft group.
- Returns:
- the currently effective member list of the Raft group this Raft node belongs to
-
getRole
@Nonnull RaftRole getRole()
Returns the role of the Raft node in the current term.- Returns:
- the role of the Raft node in the current term
-
getStatus
@Nonnull RaftNodeStatus getStatus()
Returns the status of the Raft node.- Returns:
- the status of the Raft node
-
getTerm
@Nonnull RaftTerm getTerm()
Returns the locally known term information.Please note that other nodes may have already switched to a higher term.
- Returns:
- the locally known term information
-
getLog
@Nonnull RaftLogStats getLog()
Returns statistics about a Raft node's local Raft log.- Returns:
- statistics about a Raft node's local Raft log
-
-