Class BrokerHealthCheckService
- java.lang.Object
-
- io.camunda.zeebe.util.sched.Actor
-
- io.camunda.zeebe.broker.system.monitoring.BrokerHealthCheckService
-
- All Implemented Interfaces:
PartitionListener,CloseableSilently,AsyncClosable,AutoCloseable
public final class BrokerHealthCheckService extends Actor implements PartitionListener
-
-
Constructor Summary
Constructors Constructor Description BrokerHealthCheckService(BrokerInfo localBroker, Atomix atomix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()booleanisBrokerHealthy()booleanisBrokerStarted()protected voidonActorStarted()ActorFuture<Void>onBecomingFollower(int partitionId, long term)Is called by theZeebePartitionon becoming partition follower after all partition installation/clean up related things are done.ActorFuture<Void>onBecomingInactive(int partitionId, long term)Is called by theZeebePartitionon becoming inactive after a Raft role change or a failed transition.ActorFuture<Void>onBecomingLeader(int partitionId, long term, LogStream logStream)Is called by theZeebePartitionon becoming partition leader after all partition installation/clean up related things are done.voidregisterMonitoredPartition(int partitionId, HealthMonitorable partition)voidsetBrokerStarted()-
Methods inherited from class io.camunda.zeebe.util.sched.Actor
buildActorName, buildActorName, close, closeAsync, handleFailure, isActorClosed, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarting, wrap
-
-
-
-
Constructor Detail
-
BrokerHealthCheckService
public BrokerHealthCheckService(BrokerInfo localBroker, Atomix atomix)
-
-
Method Detail
-
onBecomingFollower
public ActorFuture<Void> onBecomingFollower(int partitionId, long term)
Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming partition follower after all partition installation/clean up related things are done.- Specified by:
onBecomingFollowerin interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current term- Returns:
- future that should be completed by the listener
-
onBecomingLeader
public ActorFuture<Void> onBecomingLeader(int partitionId, long term, LogStream logStream)
Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming partition leader after all partition installation/clean up related things are done.- Specified by:
onBecomingLeaderin interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current termlogStream- the corresponding log stream- Returns:
- future that should be completed by the listener
-
onBecomingInactive
public ActorFuture<Void> onBecomingInactive(int partitionId, long term)
Description copied from interface:PartitionListenerIs called by theZeebePartitionon becoming inactive after a Raft role change or a failed transition.- Specified by:
onBecomingInactivein interfacePartitionListener- Parameters:
partitionId- the corresponding partition idterm- the current term- Returns:
- future that should be completed by the listener
-
onActorStarted
protected void onActorStarted()
- Overrides:
onActorStartedin classActor
-
registerMonitoredPartition
public void registerMonitoredPartition(int partitionId, HealthMonitorable partition)
-
isBrokerHealthy
public boolean isBrokerHealthy()
-
setBrokerStarted
public void setBrokerStarted()
-
isBrokerStarted
public boolean isBrokerStarted()
-
-