接口的使用
cn.wjybxx.concurrent.IFuture
使用IFuture的程序包
-
cn.wjybxx.concurrent中IFuture的使用
修饰符和类型类说明class提供转发功能的基类 由于Future中存在取消接口,因此该类还不是Readonly的。classPromise<T>声明IFuture接口加快instanceof测试final class为IPromise提供只读视图class声明为IFuture的cn.wjybxx.concurrent中的字段返回IFuture的cn.wjybxx.concurrent中的方法修饰符和类型方法说明static IFuture<?> static IFuture<?> ForwardFuture.asReadonly()IFuture.asReadonly()返回只读的Future视图, 如果Future是一个提供了写接口的Promise,则返回一个只读的Future视图,返回的实例会在当前Promise进入完成状态时进入完成状态。Promise.asReadonly()ReadOnlyFuture.asReadonly()IFuture.await()阻塞到任务完成IFuture.awaitUninterruptibly()阻塞到任务完成static <T> IFuture<T> ForwardFuture.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends V> fallback) ForwardFuture.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends V> fallback, IContext ctx, int options) IFuture.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback) IFuture.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback, IContext ctx, int options) ForwardFuture.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends V> fallback) ForwardFuture.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends V> fallback, IContext ctx, int options) IFuture.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback) IFuture.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback, IContext ctx, int options) static <V> IFuture<V> FutureUtils.completedFuture(V result) static <V> IFuture<V> FutureUtils.completedFuture(V result, Executor executor) <U> IFuture<U> ForwardFuture.composeApply(BiFunction<? super IContext, ? super V, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeApply(BiFunction<? super IContext, ? super V, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeApply(BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeApply(BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super V, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super V, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) ForwardFuture.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<V>> fallback) ForwardFuture.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<V>> fallback, IContext ctx, int options) IFuture.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback) IFuture.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback, IContext ctx, int options) ForwardFuture.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<V>> fallback) ForwardFuture.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<V>> fallback, IContext ctx, int options) IFuture.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback) IFuture.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback, IContext ctx, int options) <U> IFuture<U> ForwardFuture.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> IFuture<U> ForwardFuture.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> IFuture<U> IFuture.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> IFuture<U> IFuture.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) static <V> IFuture<V> FutureUtils.failedFuture(Throwable cause) static <V> IFuture<V> FutureUtils.failedFuture(Throwable cause, Executor executor) <U> IFuture<U> ForwardFuture.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, Throwable, ? extends U> fn) <U> IFuture<U> ForwardFuture.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, Throwable, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> IFuture.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn) <U> IFuture<U> IFuture.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, Throwable, ? extends U> fn) <U> IFuture<U> ForwardFuture.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super V, Throwable, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> IFuture.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn) <U> IFuture<U> IFuture.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn, IContext ctx, int options) final IFuture<?> DisruptorEventLoop.runningFuture()IFuture<?> EventLoop.runningFuture()等待线程进入运行状态的future future会在EventLoop成功启动的时候进入完成状态IFuture<?> DisruptorEventLoop.start()IFuture<?> EventLoop.start()主动启动EventLoop 一般而言,我们可以不主动启动EventLoop,在提交任务时会自动启动EventLoop,但如果我们需要确保EventLoop处于正确的状态才能对外提供服务时,则可以主动启动时EventLoop。<T> IFuture<T> AbstractEventLoop.submit(TaskBuilder<T> builder) <T> IFuture<T> <T> IFuture<T> AbstractEventLoopGroup.submit(TaskBuilder<T> builder) <T> IFuture<T> static <T> IFuture<T> FutureUtils.submit(IExecutor executor, TaskBuilder<T> builder) <T> IFuture<T> IExecutorService.submit(TaskBuilder<T> builder) default IFuture<?> 已过时。default <T> IFuture<T> <T> IFuture<T> IFuture<?> AbstractEventLoop.submitAction(Runnable task) IFuture<?> AbstractEventLoop.submitAction(Runnable task, int options) 该方法可能和ExecutorService.submit(Runnable, Object)冲突,因此我们要带后缀IFuture<?> AbstractEventLoop.submitAction(Consumer<? super IContext> task, IContext ctx) IFuture<?> AbstractEventLoop.submitAction(Consumer<? super IContext> task, IContext ctx, int options) IFuture<?> AbstractEventLoopGroup.submitAction(Runnable task) IFuture<?> AbstractEventLoopGroup.submitAction(Runnable task, int options) IFuture<?> AbstractEventLoopGroup.submitAction(Consumer<? super IContext> task, IContext ctx) IFuture<?> AbstractEventLoopGroup.submitAction(Consumer<? super IContext> task, IContext ctx, int options) static IFuture<?> FutureUtils.submitAction(IExecutor executor, Runnable action, int options) static IFuture<?> FutureUtils.submitAction(IExecutor executor, Consumer<? super IContext> task, IContext ctx, int options) static IFuture<?> FutureUtils.submitAction(Executor executor, Runnable action) static IFuture<?> FutureUtils.submitAction(Executor executor, Consumer<? super IContext> task, IContext ctx) IFuture<?> IExecutorService.submitAction(Runnable task) IFuture<?> IExecutorService.submitAction(Runnable task, int options) IFuture<?> IExecutorService.submitAction(Consumer<? super IContext> task, IContext ctx) IFuture<?> IExecutorService.submitAction(Consumer<? super IContext> task, IContext ctx, int options) <V> IFuture<V> AbstractEventLoop.submitFunc(Callable<? extends V> task) <V> IFuture<V> AbstractEventLoop.submitFunc(Callable<? extends V> task, int options) <V> IFuture<V> AbstractEventLoop.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx) <V> IFuture<V> AbstractEventLoop.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx, int options) <V> IFuture<V> AbstractEventLoopGroup.submitFunc(Callable<? extends V> task) <V> IFuture<V> AbstractEventLoopGroup.submitFunc(Callable<? extends V> task, int options) <V> IFuture<V> AbstractEventLoopGroup.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx) <V> IFuture<V> AbstractEventLoopGroup.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx, int options) static <V> IFuture<V> FutureUtils.submitFunc(IExecutor executor, Callable<? extends V> task, int options) static <V> IFuture<V> FutureUtils.submitFunc(IExecutor executor, Function<? super IContext, ? extends V> task, IContext ctx, int options) static <V> IFuture<V> FutureUtils.submitFunc(Executor executor, Callable<? extends V> task) static <V> IFuture<V> FutureUtils.submitFunc(Executor executor, Function<? super IContext, ? extends V> task, IContext ctx) <T> IFuture<T> IExecutorService.submitFunc(Callable<? extends T> task) <T> IFuture<T> IExecutorService.submitFunc(Callable<? extends T> task, int options) <T> IFuture<T> IExecutorService.submitFunc(Function<? super IContext, ? extends T> task, IContext ctx) <T> IFuture<T> IExecutorService.submitFunc(Function<? super IContext, ? extends T> task, IContext ctx, int options) static <T> IFuture<T> FutureUtils.supplyAsync(Executor executor, Supplier<? extends T> supplier) IFuture<?> DefaultFixedEventLoopGroup.terminationFuture()final IFuture<?> DisruptorEventLoop.terminationFuture()IFuture<?> EventLoopGroup.terminationFuture()返回等待线程终止的future。IFuture<?> IExecutorService.terminationFuture()返回Future将在Executor终止时进入完成状态。ForwardFuture.thenAccept(BiConsumer<? super IContext, ? super V> action) ForwardFuture.thenAccept(BiConsumer<? super IContext, ? super V> action, IContext ctx, int options) IFuture.thenAccept(BiConsumer<? super IContext, ? super T> action) IFuture.thenAccept(BiConsumer<? super IContext, ? super T> action, IContext ctx, int options) ForwardFuture.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super V> action) ForwardFuture.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super V> action, IContext ctx, int options) IFuture.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super T> action) IFuture.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super T> action, IContext ctx, int options) <U> IFuture<U> ForwardFuture.thenApply(BiFunction<? super IContext, ? super V, ? extends U> fn) <U> IFuture<U> ForwardFuture.thenApply(BiFunction<? super IContext, ? super V, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> IFuture.thenApply(BiFunction<? super IContext, ? super T, ? extends U> fn) <U> IFuture<U> IFuture.thenApply(BiFunction<? super IContext, ? super T, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> ForwardFuture.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super V, ? extends U> fn) <U> IFuture<U> ForwardFuture.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super V, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> IFuture.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends U> fn) <U> IFuture<U> IFuture.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> <U> IFuture<U> <U> IFuture<U> <U> IFuture<U> <U> IFuture<U> ForwardFuture.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn) <U> IFuture<U> ForwardFuture.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn, IContext ctx, int options) <U> IFuture<U> IFuture.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn) <U> IFuture<U> IFuture.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn, IContext ctx, int options) ForwardFuture.thenRunAsync(Executor executor, Consumer<? super IContext> action) ForwardFuture.thenRunAsync(Executor executor, Consumer<? super IContext> action, IContext ctx, int options) IFuture.thenRunAsync(Executor executor, Consumer<? super IContext> action) IFuture.thenRunAsync(Executor executor, Consumer<? super IContext> action, IContext ctx, int options) ICompletionStage.toFuture()返回一个Future,保持与这个Stage相同的完成结果。Promise.toFuture()ForwardFuture.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super V, ? super Throwable> action) ForwardFuture.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super V, ? super Throwable> action, IContext ctx, int options) IFuture.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action) IFuture.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action, IContext ctx, int options) ForwardFuture.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super V, ? super Throwable> action) ForwardFuture.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super V, ? super Throwable> action, IContext ctx, int options) IFuture.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action) IFuture.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action, IContext ctx, int options) 参数类型为IFuture的cn.wjybxx.concurrent中的方法修饰符和类型方法说明static IFuture<?> static IFuture<?> static ThrowablebooleanIPromise.tryTransferFrom(IFuture<? extends T> input) 将目标future的结果传输到当前Promise 如果目标future已完成,且当前promise尚未完成,则尝试传输结果到promisefinal booleanPromise.tryTransferFrom(IFuture<? extends T> input) 类型变量类型为IFuture的cn.wjybxx.concurrent中的方法参数修饰符和类型方法说明voidForwardFuture.onCompleted(BiConsumer<? super IFuture<V>, ? super IContext> action, IContext context) voidForwardFuture.onCompleted(BiConsumer<? super IFuture<V>, ? super IContext> action, IContext context, int options) voidForwardFuture.onCompleted(Consumer<? super IFuture<V>> action) voidForwardFuture.onCompleted(Consumer<? super IFuture<V>> action, int options) voidIFuture.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidIFuture.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) 该接口支持Context参数,可响应取消voidIFuture.onCompleted(Consumer<? super IFuture<T>> action) voidIFuture.onCompleted(Consumer<? super IFuture<T>> action, int options) 最原始的Future监听接口 1.voidPromise.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidPromise.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) voidPromise.onCompleted(Consumer<? super IFuture<T>> action) voidPromise.onCompleted(Consumer<? super IFuture<T>> action, int options) voidForwardFuture.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<V>, ? super IContext> action, IContext context) voidForwardFuture.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<V>, ? super IContext> action, IContext context, int options) voidForwardFuture.onCompletedAsync(Executor executor, Consumer<? super IFuture<V>> action) voidForwardFuture.onCompletedAsync(Executor executor, Consumer<? super IFuture<V>> action, int options) voidIFuture.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidIFuture.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) voidIFuture.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action) voidIFuture.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action, int options) voidPromise.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidPromise.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) voidPromise.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action) voidPromise.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action, int options) 参数类型为IFuture的cn.wjybxx.concurrent中的构造器 -
cn.wjybxx.sequential中IFuture的使用
返回IFuture的cn.wjybxx.sequential中的方法修饰符和类型方法说明UniPromise.asReadonly()static <V> IFuture<V> UniFutureUtils.completedFuture(V result) static <V> IFuture<V> UniFutureUtils.completedFuture(V result, Executor executor) static <V> IFuture<V> UniFutureUtils.failedFuture(Throwable ex) static <V> IFuture<V> UniFutureUtils.failedFuture(Throwable ex, Executor executor) <T> IFuture<T> AbstractUniExecutor.submit(TaskBuilder<T> builder) <T> IFuture<T> <V> IFuture<V> AbstractUniScheduledExecutor.submit(TaskBuilder<V> builder) <T> IFuture<T> IFuture<?> AbstractUniExecutor.submitAction(Runnable task) IFuture<?> AbstractUniExecutor.submitAction(Runnable task, int options) IFuture<?> AbstractUniExecutor.submitAction(Consumer<? super IContext> task, IContext ctx) IFuture<?> AbstractUniExecutor.submitAction(Consumer<? super IContext> task, IContext ctx, int options) IFuture<?> AbstractUniScheduledExecutor.submitAction(Runnable task) IFuture<?> AbstractUniScheduledExecutor.submitAction(Runnable task, int options) IFuture<?> AbstractUniScheduledExecutor.submitAction(Consumer<? super IContext> task, IContext ctx) IFuture<?> AbstractUniScheduledExecutor.submitAction(Consumer<? super IContext> task, IContext ctx, int options) <V> IFuture<V> AbstractUniExecutor.submitFunc(Callable<? extends V> task) <V> IFuture<V> AbstractUniExecutor.submitFunc(Callable<? extends V> task, int options) <V> IFuture<V> AbstractUniExecutor.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx) <V> IFuture<V> AbstractUniExecutor.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx, int options) <V> IFuture<V> AbstractUniScheduledExecutor.submitFunc(Callable<? extends V> task) <V> IFuture<V> AbstractUniScheduledExecutor.submitFunc(Callable<? extends V> task, int options) <V> IFuture<V> AbstractUniScheduledExecutor.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx) <V> IFuture<V> AbstractUniScheduledExecutor.submitFunc(Function<? super IContext, ? extends V> task, IContext ctx, int options) IFuture<?> DefaultUniExecutor.terminationFuture()IFuture<?> DefaultUniScheduledExecutor.terminationFuture()UniPromise.toFuture()参数类型为IFuture的cn.wjybxx.sequential中的方法类型变量类型为IFuture的cn.wjybxx.sequential中的方法参数修饰符和类型方法说明UniFutureCombiner.addAll(Collection<? extends IFuture<?>> futures) voidUniPromise.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidUniPromise.onCompleted(BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) voidUniPromise.onCompleted(Consumer<? super IFuture<T>> action) voidUniPromise.onCompleted(Consumer<? super IFuture<T>> action, int options) voidUniPromise.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context) voidUniPromise.onCompletedAsync(Executor executor, BiConsumer<? super IFuture<T>, ? super IContext> action, IContext context, int options) voidUniPromise.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action) voidUniPromise.onCompletedAsync(Executor executor, Consumer<? super IFuture<T>> action, int options)
IExecutorService.submitAction(Runnable)}