Class ExtendedProcessingScheduleServiceImpl

java.lang.Object
io.camunda.zeebe.stream.impl.ExtendedProcessingScheduleServiceImpl
All Implemented Interfaces:
ProcessingScheduleService, SimpleProcessingScheduleService

public class ExtendedProcessingScheduleServiceImpl extends Object implements ProcessingScheduleService
  • Constructor Details

  • Method Details

    • runAtFixedRateAsync

      public void runAtFixedRateAsync(Duration delay, Task task)
      Description copied from interface: ProcessingScheduleService
      Schedule a task to execute at a fixed rate. After an initial delay, the task is executed. Once the task is executed, it is rescheduled with the same delay again.

      The execution of the scheduled task is running asynchronously/concurrently to task scheduled through non-async methods. While other, non-async methods guarantee the execution order of scheduled tasks and always execute scheduled tasks on the same thread, this method does not guarantee this.

      Note that time-traveling in tests only affects the delay of the currently scheduled next task and not any of the iterations after. This is because the next task is scheduled with the delay counted from the new time (i.e. the time after time traveling + task execution duration + delay duration = scheduled time of the next task).

      Specified by:
      runAtFixedRateAsync in interface ProcessingScheduleService
      Parameters:
      delay - The delay to wait initially and between each run
      task - The task to execute at the fixed rate
    • runDelayedAsync

      public void runDelayedAsync(Duration delay, Task task)
      Description copied from interface: ProcessingScheduleService
      Schedule a task to execute with a specific delay. After that delay, the task is executed.

      The execution of the scheduled task is running asynchronously/concurrently to task scheduled through non-async methods. While other, non-async methods guarantee the execution order of scheduled tasks and always execute scheduled tasks on the same thread, this method does not guarantee this.

      Specified by:
      runDelayedAsync in interface ProcessingScheduleService
      Parameters:
      delay - The delay to wait before executing the task
      task - The task to execute after the delay
    • runDelayed

      public void runDelayed(Duration delay, Runnable task)
      Specified by:
      runDelayed in interface SimpleProcessingScheduleService
    • runDelayed

      public void runDelayed(Duration delay, Task task)
      Specified by:
      runDelayed in interface SimpleProcessingScheduleService
    • runAtFixedRate

      public void runAtFixedRate(Duration delay, Task task)
      Specified by:
      runAtFixedRate in interface SimpleProcessingScheduleService