Class RemoteJobStreamErrorHandlerService

java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.broker.jobstream.RemoteJobStreamErrorHandlerService
All Implemented Interfaces:
PartitionListener, AsyncClosable, ConcurrencyControl, RemoteStreamErrorHandler<ActivatedJob>, AutoCloseable

public final class RemoteJobStreamErrorHandlerService extends Actor implements PartitionListener, RemoteStreamErrorHandler<ActivatedJob>
An empty actor which is used as the execution context for the RemoteJobStreamErrorHandler. We split this off from the handler itself to simplify testing and not rely on a complete actor scheduler.
  • Constructor Details

    • RemoteJobStreamErrorHandlerService

      public RemoteJobStreamErrorHandlerService(JobStreamErrorHandler errorHandler)
  • Method Details

    • getName

      public String getName()
      Overrides:
      getName in class Actor
    • onBecomingFollower

      public ActorFuture<Void> onBecomingFollower(int partitionId, long term)
      Description copied from interface: PartitionListener
      Is called by the ZeebePartition on becoming partition follower after all partition installation/clean up related things are done.
      Specified by:
      onBecomingFollower in interface PartitionListener
      Parameters:
      partitionId - the corresponding partition id
      term - 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: PartitionListener
      Is called by the ZeebePartition on becoming partition leader after all partition installation/clean up related things are done.
      Specified by:
      onBecomingLeader in interface PartitionListener
      Parameters:
      partitionId - the corresponding partition id
      term - the current term
      logStream - the corresponding log stream
      queryService - the corresponding query service
      Returns:
      future that should be completed by the listener
    • onBecomingInactive

      public ActorFuture<Void> onBecomingInactive(int partitionId, long term)
      Description copied from interface: PartitionListener
      Is called by the ZeebePartition on becoming inactive after a Raft role change or a failed transition.
      Specified by:
      onBecomingInactive in interface PartitionListener
      Parameters:
      partitionId - the corresponding partition id
      term - the current term
      Returns:
      future that should be completed by the listener
    • handleError

      public void handleError(Throwable error, ActivatedJob job)
      Specified by:
      handleError in interface RemoteStreamErrorHandler<ActivatedJob>