Package io.microraft.lifecycle
Interface RaftNodeLifecycleAware
-
public interface RaftNodeLifecycleAware
Used byRaftNode
to notify its components for its lifecycle-related changes, such as startup and termination. These components areRaftNodeExecutor
,StateMachine
,RaftModelFactory
,Transport
,RaftStore
, andRaftNodeReportListener
.RaftNode
does not manage the lifecycle of the components provided to it during construction. It only notifies the components that implement this interface.RaftNode
calls the lifecycle-aware components in random order.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
onRaftNodeStart()
Called byRaftNode
during startup.default void
onRaftNodeTerminate()
Called byRaftNode
during termination.
-