Class LeaderManagementRequestHandler
java.lang.Object
io.camunda.zeebe.util.sched.Actor
io.camunda.zeebe.broker.system.management.LeaderManagementRequestHandler
- All Implemented Interfaces:
PartitionListener,DiskSpaceUsageListener,CloseableSilently,AsyncClosable,ConcurrencyControl,AutoCloseable
public final class LeaderManagementRequestHandler
extends Actor
implements PartitionListener, DiskSpaceUsageListener
-
Nested Class Summary
Nested classes/interfaces inherited from class io.camunda.zeebe.util.sched.Actor
Actor.ActorBuilder -
Field Summary
Fields inherited from class io.camunda.zeebe.util.sched.Actor
actor, ACTOR_PROP_NAME, ACTOR_PROP_PARTITION_ID -
Constructor Summary
ConstructorsConstructorDescriptionLeaderManagementRequestHandler(BrokerInfo localBroker, ClusterCommunicationService communicationService, ClusterEventService eventService) -
Method Summary
Modifier and TypeMethodDescriptiongetName()protected voidonBecomingFollower(int partitionId, long term) Is called by theZeebePartitionon becoming partition follower after all partition installation/clean up related things are done.onBecomingInactive(int partitionId, long term) Is called by theZeebePartitionon becoming inactive after a Raft role change or a failed transition.onBecomingLeader(int partitionId, long term, LogStream logStream, QueryService queryService) Is called by theZeebePartitionon becoming partition leader after all partition installation/clean up related things are done.voidWill be called when disk space usage goes below the threshold after it was above it.voidWill be called when disk space usage grows above the thresholdMethods inherited from class io.camunda.zeebe.util.sched.Actor
buildActorName, buildActorName, close, closeAsync, createContext, getContext, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarted, run, runOnCompletion, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.util.sched.ConcurrencyControl
createCompletedFuture, createFuture
-
Constructor Details
-
LeaderManagementRequestHandler
public LeaderManagementRequestHandler(BrokerInfo localBroker, ClusterCommunicationService communicationService, ClusterEventService eventService)
-
-
Method Details
-
onBecomingFollower
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, QueryService queryService) 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 streamqueryService- the corresponding query service- Returns:
- future that should be completed by the listener
-
onBecomingInactive
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
-
getName
-
onActorStarting
protected void onActorStarting()- Overrides:
onActorStartingin classActor
-
getPushDeploymentRequestHandler
-
onDiskSpaceNotAvailable
public void onDiskSpaceNotAvailable()Description copied from interface:DiskSpaceUsageListenerWill be called when disk space usage grows above the threshold- Specified by:
onDiskSpaceNotAvailablein interfaceDiskSpaceUsageListener
-
onDiskSpaceAvailable
public void onDiskSpaceAvailable()Description copied from interface:DiskSpaceUsageListenerWill be called when disk space usage goes below the threshold after it was above it.- Specified by:
onDiskSpaceAvailablein interfaceDiskSpaceUsageListener
-