Class CommandApiServiceImpl
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.broker.transport.commandapi.CommandApiServiceImpl
- All Implemented Interfaces:
PartitionListener,DiskSpaceUsageListener,CommandApiService,AsyncClosable,ConcurrencyControl,AutoCloseable
public final class CommandApiServiceImpl
extends Actor
implements PartitionListener, DiskSpaceUsageListener, CommandApiService
-
Nested Class Summary
Nested classes/interfaces inherited from class io.camunda.zeebe.scheduler.Actor
Actor.ActorBuilder -
Field Summary
Fields inherited from class io.camunda.zeebe.scheduler.Actor
actor, ACTOR_PROP_NAME, ACTOR_PROP_PARTITION_ID -
Constructor Summary
ConstructorsConstructorDescriptionCommandApiServiceImpl(ServerTransport serverTransport, BrokerInfo localBroker, PartitionAwareRequestLimiter limiter, ActorSchedulingService scheduler, QueryApiCfg queryApiCfg) -
Method Summary
Modifier and TypeMethodDescriptiongetName()Consumer<TypedRecord<?>>getOnProcessedListener(int partitionId) protected voidprotected 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.scheduler.Actor
buildActorName, call, close, closeAsync, createContext, getContext, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorFailed, onActorStarted, run, runOnCompletion, schedule, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.scheduler.ConcurrencyControl
createCompletedFuture, createFuture
-
Constructor Details
-
CommandApiServiceImpl
public CommandApiServiceImpl(ServerTransport serverTransport, BrokerInfo localBroker, PartitionAwareRequestLimiter limiter, ActorSchedulingService scheduler, QueryApiCfg queryApiCfg)
-
-
Method Details
-
getName
-
onActorStarting
protected void onActorStarting()- Overrides:
onActorStartingin classActor
-
onActorClosing
protected void onActorClosing()- Overrides:
onActorClosingin classActor
-
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
-
newCommandResponseWriter
- Specified by:
newCommandResponseWriterin interfaceCommandApiService
-
getOnProcessedListener
- Specified by:
getOnProcessedListenerin interfaceCommandApiService
-
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
-