Class WrappingTasksAsync
java.lang.Object
org.projectnessie.nessie.tasks.async.wrapping.WrappingTasksAsync
- All Implemented Interfaces:
TasksAsync
- Direct Known Subclasses:
ThreadContextTasksAsync
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcalculateDelay(Clock clock, long minimumDelayMillis, Instant scheduleNotBefore) clock()Schedule aRunnableto run at the given timestamp.<R> CompletionStage<R>protected abstract RunnablewrapRunnable(Runnable runnable) protected abstract <R> Supplier<R>wrapSupplier(Supplier<R> supplier)
-
Constructor Details
-
WrappingTasksAsync
-
-
Method Details
-
wrapRunnable
-
wrapSupplier
-
clock
- Specified by:
clockin interfaceTasksAsync
-
call
- Specified by:
callin interfaceTasksAsync
-
supply
- Specified by:
supplyin interfaceTasksAsync
-
schedule
Description copied from interface:TasksAsyncSchedule 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.
- Specified by:
schedulein interfaceTasksAsync
-
calculateDelay
- Specified by:
calculateDelayin interfaceTasksAsync
-