Class ProgressCompletableFuture<T>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
org.teamapps.ux.task.ProgressCompletableFuture<T>
- All Implemented Interfaces:
CompletionStage<T>,Future<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancompleteAsync(Supplier<? extends T> supplier) completeAsync(Supplier<? extends T> supplier, Executor executor) completeAsync(ProgressReportingSupplier<? extends T> supplier) completeAsync(ProgressReportingSupplier<? extends T> supplier, Executor executor) booleancompleteOnTimeout(T value, long timeout, TimeUnit unit) exceptionally(Function<Throwable, ? extends T> fn) exceptionally(ProgressReportingFunction<Throwable, ? extends T> fn) exceptionallyWithCurrentSessionContext(Function<Throwable, ? extends T> fn) <U> ProgressCompletableFuture<U> handle(BiFunction<? super T, Throwable, ? extends U> fn) <U> ProgressCompletableFuture<U> handle(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn) <U> ProgressCompletableFuture<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn) <U> ProgressCompletableFuture<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn) <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn, Executor executor) <U> ProgressCompletableFuture<U> handleWithCurrentSessionContext(BiFunction<? super T, Throwable, ? extends U> fn) <U> ProgressCompletableFuture<U> static ProgressCompletableFuture<Void> static ProgressCompletableFuture<Void> static ProgressCompletableFuture<Void> runAsync(ProgressReportingRunnable runnable) static ProgressCompletableFuture<Void> runAsync(ProgressReportingRunnable runnable, Executor executor) static <U> ProgressCompletableFuture<U> supplyAsync(Supplier<U> supplier) static <U> ProgressCompletableFuture<U> supplyAsync(Supplier<U> supplier, Executor executor) static <U> ProgressCompletableFuture<U> supplyAsync(ProgressReportingSupplier<U> supplier) static <U> ProgressCompletableFuture<U> supplyAsync(ProgressReportingSupplier<U> supplier, Executor executor) thenAccept(Consumer<? super T> action) thenAccept(ProgressReportingConsumer<? super T> action) thenAcceptAsync(Consumer<? super T> action) thenAcceptAsync(Consumer<? super T> action, Executor executor) thenAcceptAsync(ProgressReportingConsumer<? super T> action) thenAcceptAsync(ProgressReportingConsumer<? super T> action, Executor executor) thenAcceptWithCurrentSessionContext(Consumer<? super T> action) <U> ProgressCompletableFuture<U> <U> ProgressCompletableFuture<U> thenApply(ProgressReportingFunction<? super T, ? extends U> fn) <U> ProgressCompletableFuture<U> thenApplyAsync(Function<? super T, ? extends U> fn) <U> ProgressCompletableFuture<U> thenApplyAsync(Function<? super T, ? extends U> fn, Executor executor) <U> ProgressCompletableFuture<U> thenApplyAsync(ProgressReportingFunction<? super T, ? extends U> fn) <U> ProgressCompletableFuture<U> thenApplyAsync(ProgressReportingFunction<? super T, ? extends U> fn, Executor executor) <U> ProgressCompletableFuture<U> thenApplyWithSessionContext(Function<? super T, ? extends U> fn) thenRun(ProgressReportingRunnable action) thenRunAsync(Runnable action) thenRunAsync(Runnable action, Executor executor) thenRunAsync(ProgressReportingRunnable action, Executor executor) whenComplete(BiConsumer<? super T, ? super Throwable> action) whenComplete(ProgressReportingBiConsumer<? super T, ? super Throwable> action) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor) whenCompleteAsync(ProgressReportingBiConsumer<? super T, ? super Throwable> action) whenCompleteAsync(ProgressReportingBiConsumer<? super T, ? super Throwable> action, Executor executor) whenCompleteWithCurrentSessionContext(BiConsumer<? super T, ? super Throwable> action) Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, completedFuture, completedStage, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, obtrudeException, obtrudeValue, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, state, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, toString
-
Field Details
-
ASYNC_POOL
-
-
Constructor Details
-
ProgressCompletableFuture
public ProgressCompletableFuture() -
ProgressCompletableFuture
-
-
Method Details
-
getProgress
-
complete
- Overrides:
completein classCompletableFuture<T>
-
completeExceptionally
- Overrides:
completeExceptionallyin classCompletableFuture<T>
-
newIncompleteFuture
- Overrides:
newIncompleteFuturein classCompletableFuture<T>
-
supplyAsync
-
supplyAsync
public static <U> ProgressCompletableFuture<U> supplyAsync(ProgressReportingSupplier<U> supplier, Executor executor) -
runAsync
-
runAsync
public static ProgressCompletableFuture<Void> runAsync(ProgressReportingRunnable runnable, Executor executor) -
supplyAsync
-
supplyAsync
-
runAsync
-
runAsync
-
thenApplyWithSessionContext
public <U> ProgressCompletableFuture<U> thenApplyWithSessionContext(Function<? super T, ? extends U> fn) -
thenAcceptWithCurrentSessionContext
public ProgressCompletableFuture<Void> thenAcceptWithCurrentSessionContext(Consumer<? super T> action) -
thenRunWithCurrentSessionContext
-
whenCompleteWithCurrentSessionContext
public ProgressCompletableFuture<T> whenCompleteWithCurrentSessionContext(BiConsumer<? super T, ? super Throwable> action) -
handleWithCurrentSessionContext
public <U> ProgressCompletableFuture<U> handleWithCurrentSessionContext(BiFunction<? super T, Throwable, ? extends U> fn) -
exceptionallyWithCurrentSessionContext
public ProgressCompletableFuture<T> exceptionallyWithCurrentSessionContext(Function<Throwable, ? extends T> fn) -
thenApply
- Specified by:
thenApplyin interfaceCompletionStage<T>- Overrides:
thenApplyin classCompletableFuture<T>
-
thenApplyAsync
- Specified by:
thenApplyAsyncin interfaceCompletionStage<T>- Overrides:
thenApplyAsyncin classCompletableFuture<T>
-
thenApplyAsync
public <U> ProgressCompletableFuture<U> thenApplyAsync(Function<? super T, ? extends U> fn, Executor executor) - Specified by:
thenApplyAsyncin interfaceCompletionStage<T>- Overrides:
thenApplyAsyncin classCompletableFuture<T>
-
thenAccept
- Specified by:
thenAcceptin interfaceCompletionStage<T>- Overrides:
thenAcceptin classCompletableFuture<T>
-
thenAcceptAsync
- Specified by:
thenAcceptAsyncin interfaceCompletionStage<T>- Overrides:
thenAcceptAsyncin classCompletableFuture<T>
-
thenAcceptAsync
public ProgressCompletableFuture<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor) - Specified by:
thenAcceptAsyncin interfaceCompletionStage<T>- Overrides:
thenAcceptAsyncin classCompletableFuture<T>
-
thenRun
- Specified by:
thenRunin interfaceCompletionStage<T>- Overrides:
thenRunin classCompletableFuture<T>
-
thenRunAsync
- Specified by:
thenRunAsyncin interfaceCompletionStage<T>- Overrides:
thenRunAsyncin classCompletableFuture<T>
-
thenRunAsync
- Specified by:
thenRunAsyncin interfaceCompletionStage<T>- Overrides:
thenRunAsyncin classCompletableFuture<T>
-
whenComplete
- Specified by:
whenCompletein interfaceCompletionStage<T>- Overrides:
whenCompletein classCompletableFuture<T>
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action) - Specified by:
whenCompleteAsyncin interfaceCompletionStage<T>- Overrides:
whenCompleteAsyncin classCompletableFuture<T>
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor) - Specified by:
whenCompleteAsyncin interfaceCompletionStage<T>- Overrides:
whenCompleteAsyncin classCompletableFuture<T>
-
handle
- Specified by:
handlein interfaceCompletionStage<T>- Overrides:
handlein classCompletableFuture<T>
-
handleAsync
- Specified by:
handleAsyncin interfaceCompletionStage<T>- Overrides:
handleAsyncin classCompletableFuture<T>
-
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) - Specified by:
handleAsyncin interfaceCompletionStage<T>- Overrides:
handleAsyncin classCompletableFuture<T>
-
toCompletableFuture
- Specified by:
toCompletableFuturein interfaceCompletionStage<T>- Overrides:
toCompletableFuturein classCompletableFuture<T>
-
exceptionally
- Specified by:
exceptionallyin interfaceCompletionStage<T>- Overrides:
exceptionallyin classCompletableFuture<T>
-
completeAsync
public ProgressCompletableFuture<T> completeAsync(Supplier<? extends T> supplier, Executor executor) - Overrides:
completeAsyncin classCompletableFuture<T>
-
completeAsync
- Overrides:
completeAsyncin classCompletableFuture<T>
-
orTimeout
- Overrides:
orTimeoutin classCompletableFuture<T>
-
completeOnTimeout
- Overrides:
completeOnTimeoutin classCompletableFuture<T>
-
thenApply
public <U> ProgressCompletableFuture<U> thenApply(ProgressReportingFunction<? super T, ? extends U> fn) -
thenApplyAsync
public <U> ProgressCompletableFuture<U> thenApplyAsync(ProgressReportingFunction<? super T, ? extends U> fn) -
thenApplyAsync
public <U> ProgressCompletableFuture<U> thenApplyAsync(ProgressReportingFunction<? super T, ? extends U> fn, Executor executor) -
thenAccept
-
thenAcceptAsync
-
thenAcceptAsync
public ProgressCompletableFuture<Void> thenAcceptAsync(ProgressReportingConsumer<? super T> action, Executor executor) -
thenRun
-
thenRunAsync
-
thenRunAsync
public ProgressCompletableFuture<Void> thenRunAsync(ProgressReportingRunnable action, Executor executor) -
whenComplete
public ProgressCompletableFuture<T> whenComplete(ProgressReportingBiConsumer<? super T, ? super Throwable> action) -
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(ProgressReportingBiConsumer<? super T, ? super Throwable> action) -
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(ProgressReportingBiConsumer<? super T, ? super Throwable> action, Executor executor) -
handle
public <U> ProgressCompletableFuture<U> handle(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn) -
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn) -
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T, Throwable, ? extends U> fn, Executor executor) -
exceptionally
public ProgressCompletableFuture<T> exceptionally(ProgressReportingFunction<Throwable, ? extends T> fn) -
completeAsync
public ProgressCompletableFuture<T> completeAsync(ProgressReportingSupplier<? extends T> supplier, Executor executor) -
completeAsync
-