DelayCompletionStage

存在 延时函数CompletionStage 扩展, 为 DelayableCompletableFuture 提供类型支持.

DelayCompletionStageDelayableCoroutineScope 的相关api以 DelayableCompletableFuture 类型的形式得到,实现 FutureCompletionStage

See also

Functions

Link copied to clipboard
abstract override fun acceptEither(other: CompletionStage<out T>, action: Consumer<in T>): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun acceptEitherAsync(other: CompletionStage<out T>, action: Consumer<in T>): DelayCompletionStage<Void?>
abstract override fun acceptEitherAsync(other: CompletionStage<out T>, action: Consumer<in T>, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun <U> applyToEither(other: CompletionStage<out T>, fn: Function<in T, U>): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun <U> applyToEitherAsync(other: CompletionStage<out T>, fn: Function<in T, U>): DelayCompletionStage<U>
abstract override fun <U> applyToEitherAsync(other: CompletionStage<out T>, fn: Function<in T, U>, executor: Executor): DelayCompletionStage<U>
Link copied to clipboard
abstract fun delay(duration: JavaDuration, runnable: Runnable): DelayCompletionStage<T>

当等待的计算结果(通过 get 可以得到的结果 )计算完成后, 延迟指定时间周期 duration,并执行 runnable 函数。

abstract fun delay(time: Long, runnable: Runnable): DelayCompletionStage<T>

当等待的计算结果(通过 get 可以得到的结果 )计算完成后, 延迟指定时间单位为 TimeUnit.MILLISECONDS 的时间周期 time,并执行 runnable 函数。

abstract fun delay(time: Long, timeUnit: TimeUnit, runnable: Runnable): DelayCompletionStage<T>

当等待的计算结果(通过 get 可以得到的结果 )计算完成后, 延迟指定时间单位为 timeUnit 的时间周期 time,并执行 runnable 函数。

Link copied to clipboard
abstract fun <V> delayAndCompute(duration: JavaDuration, function: Function<T, V>): DelayCompletionStage<V>

当等待的计算结果(通过 get 可以得到的结果 )计算完成后, 延迟指定时间周期 duration,并执行 function 函数。

abstract fun <V> delayAndCompute(time: Long, function: Function<T, V>): DelayCompletionStage<V>
abstract fun <V> delayAndCompute(time: Long, timeUnit: TimeUnit, function: Function<T, V>): DelayCompletionStage<V>

当等待的计算结果(通过 get 可以得到的结果 )计算完成后, 延迟指定时间单位为 TimeUnit.MILLISECONDS 的时间周期 time,并执行 function 函数。

Link copied to clipboard
abstract override fun exceptionally(fn: Function<Throwable, out T>): DelayCompletionStage<T>
Link copied to clipboard
abstract override fun <U> handle(fn: BiFunction<in T?, Throwable?, out U>): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun <U> handleAsync(fn: BiFunction<in T?, Throwable?, out U>): DelayCompletionStage<U>
abstract override fun <U> handleAsync(fn: BiFunction<in T?, Throwable?, out U>, executor: Executor): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun runAfterBoth(other: CompletionStage<*>, action: Runnable): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun runAfterBothAsync(other: CompletionStage<*>, action: Runnable): DelayCompletionStage<Void?>
abstract override fun runAfterBothAsync(other: CompletionStage<*>, action: Runnable, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun runAfterEither(other: CompletionStage<*>, action: Runnable): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun runAfterEitherAsync(other: CompletionStage<*>, action: Runnable): DelayCompletionStage<Void?>
abstract override fun runAfterEitherAsync(other: CompletionStage<*>, action: Runnable, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun thenAccept(action: Consumer<in T>): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun thenAcceptAsync(action: Consumer<in T>): DelayCompletionStage<Void?>
abstract override fun thenAcceptAsync(action: Consumer<in T>, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun <U> thenAcceptBoth(other: CompletionStage<out U>, action: BiConsumer<in T, in U>): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun <U> thenAcceptBothAsync(other: CompletionStage<out U>, action: BiConsumer<in T, in U>): DelayCompletionStage<Void?>
abstract override fun <U> thenAcceptBothAsync(other: CompletionStage<out U>, action: BiConsumer<in T, in U>, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun <U> thenApply(fn: Function<in T, out U>): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun <U> thenApplyAsync(fn: Function<in T, out U>): DelayCompletionStage<U>
abstract override fun <U> thenApplyAsync(fn: Function<in T, out U>, executor: Executor): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun <U, V> thenCombine(other: CompletionStage<out U>, fn: BiFunction<in T, in U, out V>): DelayCompletionStage<V>
Link copied to clipboard
abstract override fun <U, V> thenCombineAsync(other: CompletionStage<out U>, fn: BiFunction<in T, in U, out V>): DelayCompletionStage<V>
abstract override fun <U, V> thenCombineAsync(other: CompletionStage<out U>, fn: BiFunction<in T, in U, out V>, executor: Executor): DelayCompletionStage<V>
Link copied to clipboard
abstract override fun <U> thenCompose(fn: Function<in T, out CompletionStage<U>>): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun <U> thenComposeAsync(fn: Function<in T, out CompletionStage<U>>): DelayCompletionStage<U>
abstract override fun <U> thenComposeAsync(fn: Function<in T, out CompletionStage<U>>, executor: Executor): DelayCompletionStage<U>
Link copied to clipboard
abstract override fun thenRun(action: Runnable): DelayCompletionStage<Void?>
Link copied to clipboard
abstract override fun thenRunAsync(action: Runnable): DelayCompletionStage<Void?>
abstract override fun thenRunAsync(action: Runnable, executor: Executor): DelayCompletionStage<Void?>
Link copied to clipboard

得到 CompletableFuture 对象。

Link copied to clipboard
abstract override fun whenComplete(action: BiConsumer<in T?, in Throwable?>): DelayCompletionStage<T>
Link copied to clipboard
abstract override fun whenCompleteAsync(action: BiConsumer<in T?, in Throwable?>): DelayCompletionStage<T>
abstract override fun whenCompleteAsync(action: BiConsumer<in T?, in Throwable?>, executor: Executor): DelayCompletionStage<T>

Inheritors

Link copied to clipboard