Package io.camunda.zeebe.engine.api
Interface ProcessingScheduleService
- All Known Implementing Classes:
ProcessingScheduleServiceImpl
public interface ProcessingScheduleService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
runAtFixedRate
(Duration delay, Task task) default void
runAtFixedRate
(Duration delay, Runnable task) Schedule a task to execute at a fixed rate.void
runDelayed
(Duration delay, Task task) void
runDelayed
(Duration delay, Runnable task) <T> void
runOnCompletion
(ActorFuture<T> precedingTask, BiConsumer<T, Throwable> followUpTask)
-
Method Details
-
runDelayed
-
runDelayed
-
runOnCompletion
-
runAtFixedRate
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 runtask
- The task to execute at the fixed rate
-
runAtFixedRate
-