类的使用
cn.wjybxx.concurrent.Promise
使用Promise的程序包
-
cn.wjybxx.concurrent中Promise的使用
返回Promise的cn.wjybxx.concurrent中的方法修饰符和类型方法说明Promise.await()Promise.awaitUninterruptibly()Promise.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback) Promise.catching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback, IContext ctx, int options) Promise.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback) Promise.catchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends T> fallback, IContext ctx, int options) static <V> Promise<V> Promise.completedPromise(V result) static <V> Promise<V> Promise.completedPromise(V result, Executor executor) <U> Promise<U> Promise.composeApply(BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeApply(BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> Promise<U> Promise.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> Promise<U> Promise.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeCall(Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> Promise<U> Promise.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeCallAsync(Executor executor, Function<? super IContext, ? extends ICompletionStage<U>> fn, IContext ctx, int options) Promise.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback) Promise.composeCatching(Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback, IContext ctx, int options) Promise.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback) Promise.composeCatchingAsync(Executor executor, Class<X> exceptionType, BiFunction<? super IContext, ? super X, ? extends ICompletionStage<T>> fallback, IContext ctx, int options) <U> Promise<U> Promise.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeHandle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) <U> Promise<U> Promise.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn) <U> Promise<U> Promise.composeHandleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, ? super Throwable, ? extends ICompletionStage<U>> fn, IContext ctx, int options) static <V> Promise<V> Promise.failedPromise(Throwable cause) static <V> Promise<V> Promise.failedPromise(Throwable cause, Executor executor) <U> Promise<U> Promise.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn) <U> Promise<U> Promise.handle(cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn, IContext ctx, int options) <U> Promise<U> Promise.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn) <U> Promise<U> Promise.handleAsync(Executor executor, cn.wjybxx.base.function.TriFunction<? super IContext, ? super T, Throwable, ? extends U> fn, IContext ctx, int options) protected <U> Promise<U> Promise.newIncompletePromise(Executor exe) Promise.thenAccept(BiConsumer<? super IContext, ? super T> action) Promise.thenAccept(BiConsumer<? super IContext, ? super T> action, IContext ctx, int options) Promise.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super T> action) Promise.thenAcceptAsync(Executor executor, BiConsumer<? super IContext, ? super T> action, IContext ctx, int options) <U> Promise<U> Promise.thenApply(BiFunction<? super IContext, ? super T, ? extends U> fn) <U> Promise<U> Promise.thenApply(BiFunction<? super IContext, ? super T, ? extends U> fn, IContext ctx, int options) <U> Promise<U> Promise.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends U> fn) <U> Promise<U> Promise.thenApplyAsync(Executor executor, BiFunction<? super IContext, ? super T, ? extends U> fn, IContext ctx, int options) <U> Promise<U> <U> Promise<U> <U> Promise<U> Promise.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn) <U> Promise<U> Promise.thenCallAsync(Executor executor, Function<? super IContext, ? extends U> fn, IContext ctx, int options) Promise.thenRunAsync(Executor executor, Consumer<? super IContext> action) Promise.thenRunAsync(Executor executor, Consumer<? super IContext> action, IContext ctx, int options) Promise.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action) Promise.whenComplete(cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action, IContext ctx, int options) Promise.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action) Promise.whenCompleteAsync(Executor executor, cn.wjybxx.base.function.TriConsumer<? super IContext, ? super T, ? super Throwable> action, IContext ctx, int options)