Interface TasksAsync
- All Known Implementing Classes:
JavaPoolTasksAsync,ThreadContextTasksAsync,VertxTasksAsync,WrappingTasksAsync
public interface TasksAsync
-
Method Summary
Modifier and TypeMethodDescriptiondefault longcalculateDelay(Clock clock, long minimumDelayMillis, Instant scheduleNotBefore) default CompletionStage<Void> clock()Schedule aRunnableto run at the given timestamp.<R> CompletionStage<R>
-
Method Details
-
clock
Clock clock() -
call
-
supply
-
schedule
Schedule aRunnableto run at the given timestamp.The scheduled task can always be cancelled as long as it is not running via
.CompletionStage.toCompletableFuture().cancel(false);Whether an already running task can be interrupted is not guaranteed and depends on the implementation. It is highly recommended to not assume that a running task can be interrupted.
-
calculateDelay
-