Class ExtendedProcessingScheduleServiceImpl
- All Implemented Interfaces:
ProcessingScheduleService,SimpleProcessingScheduleService
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedProcessingScheduleServiceImpl(SimpleProcessingScheduleService processorActorService, SimpleProcessingScheduleService asyncActorService, ConcurrencyControl concurrencyControl) -
Method Summary
Modifier and TypeMethodDescriptionvoidrunAtFixedRate(Duration delay, Task task) voidrunAtFixedRateAsync(Duration delay, Task task) Schedule a task to execute at a fixed rate.voidrunDelayed(Duration delay, Task task) voidrunDelayed(Duration delay, Runnable task) voidrunDelayedAsync(Duration delay, Task task) Schedule a task to execute with a specific delay.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.engine.api.SimpleProcessingScheduleService
runAtFixedRate
-
Constructor Details
-
ExtendedProcessingScheduleServiceImpl
public ExtendedProcessingScheduleServiceImpl(SimpleProcessingScheduleService processorActorService, SimpleProcessingScheduleService asyncActorService, ConcurrencyControl concurrencyControl)
-
-
Method Details
-
runAtFixedRateAsync
Description copied from interface:ProcessingScheduleServiceSchedule 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:
runAtFixedRateAsyncin interfaceProcessingScheduleService- Parameters:
delay- The delay to wait initially and between each runtask- The task to execute at the fixed rate
-
runDelayedAsync
Description copied from interface:ProcessingScheduleServiceSchedule a task to execute with a specific delay. After that delay, the task is executed.The execution of the scheduled task is running asynchronously/concurrent to other scheduled tasks. Other methods will guarantee ordering of scheduled tasks and running always in same thread, these guarantees don't apply to this method.
- Specified by:
runDelayedAsyncin interfaceProcessingScheduleService- Parameters:
delay- The delay to wait before executing the tasktask- The task to execute after the delay
-
runDelayed
- Specified by:
runDelayedin interfaceSimpleProcessingScheduleService
-
runDelayed
- Specified by:
runDelayedin interfaceSimpleProcessingScheduleService
-
runAtFixedRate
- Specified by:
runAtFixedRatein interfaceSimpleProcessingScheduleService
-