Interface ProcessingScheduleService

All Known Implementing Classes:
ProcessingScheduleServiceImpl

public interface ProcessingScheduleService
  • Method Details

    • runDelayed

      void runDelayed(Duration delay, Runnable task)
    • runDelayed

      void runDelayed(Duration delay, Task task)
    • runOnCompletion

      <T> void runOnCompletion(ActorFuture<T> precedingTask, BiConsumer<T,Throwable> followUpTask)
    • runAtFixedRate

      default void runAtFixedRate(Duration delay, Runnable task)
      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.

      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).

      Parameters:
      delay - The delay to wait initially and between each run
      task - The task to execute at the fixed rate
    • runAtFixedRate

      void runAtFixedRate(Duration delay, Task task)