Package io.microraft.report
Interface RaftNodeReportListener
-
- All Superinterfaces:
Consumer<RaftNodeReport>
public interface RaftNodeReportListener extends Consumer<RaftNodeReport>
Used for informing external systems about events related to the execution of the Raft consensus algorithm.Called when term, role, status, known leader, or member list of the Raft node changes.
A
RaftNodeReportListener
implementation can implementRaftNodeLifecycleAware
to perform initialization and clean up work duringRaftNode
startup and termination.RaftNode
callsRaftNodeLifecycleAware.onRaftNodeStart()
before calling any other method onRaftNodeReportListener
, and finally callsRaftNodeLifecycleAware.onRaftNodeTerminate()
on termination.- See Also:
RaftNodeReport
,RaftNode