Package org.teamapps.ux.task
Class ProgressCompletableFuture<T>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<T>
-
- org.teamapps.ux.task.ProgressCompletableFuture<T>
-
- All Implemented Interfaces:
java.util.concurrent.CompletionStage<T>,java.util.concurrent.Future<T>
public class ProgressCompletableFuture<T> extends java.util.concurrent.CompletableFuture<T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.ExecutorASYNC_POOL
-
Constructor Summary
Constructors Constructor Description ProgressCompletableFuture()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProgressCompletableFuture<T>completeAsync(java.util.function.Supplier<? extends T> supplier)ProgressCompletableFuture<T>completeAsync(java.util.function.Supplier<? extends T> supplier, java.util.concurrent.Executor executor)ProgressCompletableFuture<T>completeAsync(ProgressReportingSupplier<? extends T> supplier)ProgressCompletableFuture<T>completeAsync(ProgressReportingSupplier<? extends T> supplier, java.util.concurrent.Executor executor)ProgressCompletableFuture<T>completeOnTimeout(T value, long timeout, java.util.concurrent.TimeUnit unit)ProgressCompletableFuture<T>exceptionally(java.util.function.Function<java.lang.Throwable,? extends T> fn)ProgressCompletableFuture<T>exceptionally(ProgressReportingFunction<java.lang.Throwable,? extends T> fn)ProgressCompletableFuture<T>exceptionallyWithCurrentSessionContext(java.util.function.Function<java.lang.Throwable,? extends T> fn)ObservableProgressgetProgress()<U> ProgressCompletableFuture<U>handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)<U> ProgressCompletableFuture<U>handle(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn)<U> ProgressCompletableFuture<U>handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)<U> ProgressCompletableFuture<U>handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)<U> ProgressCompletableFuture<U>handleAsync(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn)<U> ProgressCompletableFuture<U>handleAsync(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)<U> ProgressCompletableFuture<U>handleWithCurrentSessionContext(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)<U> ProgressCompletableFuture<U>newIncompleteFuture()ProgressCompletableFuture<T>orTimeout(long timeout, java.util.concurrent.TimeUnit unit)static ProgressCompletableFuture<java.lang.Void>runAsync(java.lang.Runnable runnable)static ProgressCompletableFuture<java.lang.Void>runAsync(java.lang.Runnable runnable, java.util.concurrent.Executor executor)static ProgressCompletableFuture<java.lang.Void>runAsync(ProgressReportingRunnable runnable)static ProgressCompletableFuture<java.lang.Void>runAsync(ProgressReportingRunnable runnable, java.util.concurrent.Executor executor)static <U> ProgressCompletableFuture<U>supplyAsync(java.util.function.Supplier<U> supplier)static <U> ProgressCompletableFuture<U>supplyAsync(java.util.function.Supplier<U> supplier, java.util.concurrent.Executor executor)static <U> ProgressCompletableFuture<U>supplyAsync(ProgressReportingSupplier<U> supplier)static <U> ProgressCompletableFuture<U>supplyAsync(ProgressReportingSupplier<U> supplier, java.util.concurrent.Executor executor)ProgressCompletableFuture<java.lang.Void>thenAccept(java.util.function.Consumer<? super T> action)ProgressCompletableFuture<java.lang.Void>thenAccept(ProgressReportingConsumer<? super T> action)ProgressCompletableFuture<java.lang.Void>thenAcceptAsync(java.util.function.Consumer<? super T> action)ProgressCompletableFuture<java.lang.Void>thenAcceptAsync(java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)ProgressCompletableFuture<java.lang.Void>thenAcceptAsync(ProgressReportingConsumer<? super T> action)ProgressCompletableFuture<java.lang.Void>thenAcceptAsync(ProgressReportingConsumer<? super T> action, java.util.concurrent.Executor executor)ProgressCompletableFuture<java.lang.Void>thenAcceptWithCurrentSessionContext(java.util.function.Consumer<? super T> action)<U> ProgressCompletableFuture<U>thenApply(java.util.function.Function<? super T,? extends U> fn)<U> ProgressCompletableFuture<U>thenApply(ProgressReportingFunction<? super T,? extends U> fn)<U> ProgressCompletableFuture<U>thenApplyAsync(java.util.function.Function<? super T,? extends U> fn)<U> ProgressCompletableFuture<U>thenApplyAsync(java.util.function.Function<? super T,? extends U> fn, java.util.concurrent.Executor executor)<U> ProgressCompletableFuture<U>thenApplyAsync(ProgressReportingFunction<? super T,? extends U> fn)<U> ProgressCompletableFuture<U>thenApplyAsync(ProgressReportingFunction<? super T,? extends U> fn, java.util.concurrent.Executor executor)<U> ProgressCompletableFuture<U>thenApplyWithSessionContext(java.util.function.Function<? super T,? extends U> fn)ProgressCompletableFuture<java.lang.Void>thenRun(java.lang.Runnable action)ProgressCompletableFuture<java.lang.Void>thenRun(ProgressReportingRunnable action)ProgressCompletableFuture<java.lang.Void>thenRunAsync(java.lang.Runnable action)ProgressCompletableFuture<java.lang.Void>thenRunAsync(java.lang.Runnable action, java.util.concurrent.Executor executor)ProgressCompletableFuture<java.lang.Void>thenRunAsync(ProgressReportingRunnable action)ProgressCompletableFuture<java.lang.Void>thenRunAsync(ProgressReportingRunnable action, java.util.concurrent.Executor executor)ProgressCompletableFuture<java.lang.Void>thenRunWithCurrentSessionContext(java.lang.Runnable action)ProgressCompletableFuture<T>toCompletableFuture()ProgressCompletableFuture<T>whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)ProgressCompletableFuture<T>whenComplete(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action)ProgressCompletableFuture<T>whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)ProgressCompletableFuture<T>whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)ProgressCompletableFuture<T>whenCompleteAsync(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action)ProgressCompletableFuture<T>whenCompleteAsync(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)ProgressCompletableFuture<T>whenCompleteWithCurrentSessionContext(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completedStage, completeExceptionally, copy, defaultExecutor, delayedExecutor, delayedExecutor, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, toString
-
-
-
-
Method Detail
-
getProgress
public ObservableProgress getProgress()
-
newIncompleteFuture
public <U> ProgressCompletableFuture<U> newIncompleteFuture()
- Overrides:
newIncompleteFuturein classjava.util.concurrent.CompletableFuture<T>
-
supplyAsync
public static <U> ProgressCompletableFuture<U> supplyAsync(ProgressReportingSupplier<U> supplier)
-
supplyAsync
public static <U> ProgressCompletableFuture<U> supplyAsync(ProgressReportingSupplier<U> supplier, java.util.concurrent.Executor executor)
-
runAsync
public static ProgressCompletableFuture<java.lang.Void> runAsync(ProgressReportingRunnable runnable)
-
runAsync
public static ProgressCompletableFuture<java.lang.Void> runAsync(ProgressReportingRunnable runnable, java.util.concurrent.Executor executor)
-
supplyAsync
public static <U> ProgressCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier)
-
supplyAsync
public static <U> ProgressCompletableFuture<U> supplyAsync(java.util.function.Supplier<U> supplier, java.util.concurrent.Executor executor)
-
runAsync
public static ProgressCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable)
-
runAsync
public static ProgressCompletableFuture<java.lang.Void> runAsync(java.lang.Runnable runnable, java.util.concurrent.Executor executor)
-
thenApplyWithSessionContext
public <U> ProgressCompletableFuture<U> thenApplyWithSessionContext(java.util.function.Function<? super T,? extends U> fn)
-
thenAcceptWithCurrentSessionContext
public ProgressCompletableFuture<java.lang.Void> thenAcceptWithCurrentSessionContext(java.util.function.Consumer<? super T> action)
-
thenRunWithCurrentSessionContext
public ProgressCompletableFuture<java.lang.Void> thenRunWithCurrentSessionContext(java.lang.Runnable action)
-
whenCompleteWithCurrentSessionContext
public ProgressCompletableFuture<T> whenCompleteWithCurrentSessionContext(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
-
handleWithCurrentSessionContext
public <U> ProgressCompletableFuture<U> handleWithCurrentSessionContext(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
-
exceptionallyWithCurrentSessionContext
public ProgressCompletableFuture<T> exceptionallyWithCurrentSessionContext(java.util.function.Function<java.lang.Throwable,? extends T> fn)
-
thenApply
public <U> ProgressCompletableFuture<U> thenApply(java.util.function.Function<? super T,? extends U> fn)
-
thenApplyAsync
public <U> ProgressCompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U> fn)
-
thenApplyAsync
public <U> ProgressCompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U> fn, java.util.concurrent.Executor executor)
-
thenAccept
public ProgressCompletableFuture<java.lang.Void> thenAccept(java.util.function.Consumer<? super T> action)
-
thenAcceptAsync
public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> action)
-
thenAcceptAsync
public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
-
thenRun
public ProgressCompletableFuture<java.lang.Void> thenRun(java.lang.Runnable action)
-
thenRunAsync
public ProgressCompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable action)
-
thenRunAsync
public ProgressCompletableFuture<java.lang.Void> thenRunAsync(java.lang.Runnable action, java.util.concurrent.Executor executor)
-
whenComplete
public ProgressCompletableFuture<T> whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
-
handle
public <U> ProgressCompletableFuture<U> handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
-
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
-
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)
-
toCompletableFuture
public ProgressCompletableFuture<T> toCompletableFuture()
-
exceptionally
public ProgressCompletableFuture<T> exceptionally(java.util.function.Function<java.lang.Throwable,? extends T> fn)
-
completeAsync
public ProgressCompletableFuture<T> completeAsync(java.util.function.Supplier<? extends T> supplier, java.util.concurrent.Executor executor)
- Overrides:
completeAsyncin classjava.util.concurrent.CompletableFuture<T>
-
completeAsync
public ProgressCompletableFuture<T> completeAsync(java.util.function.Supplier<? extends T> supplier)
- Overrides:
completeAsyncin classjava.util.concurrent.CompletableFuture<T>
-
orTimeout
public ProgressCompletableFuture<T> orTimeout(long timeout, java.util.concurrent.TimeUnit unit)
- Overrides:
orTimeoutin classjava.util.concurrent.CompletableFuture<T>
-
completeOnTimeout
public ProgressCompletableFuture<T> completeOnTimeout(T value, long timeout, java.util.concurrent.TimeUnit unit)
- Overrides:
completeOnTimeoutin classjava.util.concurrent.CompletableFuture<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, java.util.concurrent.Executor executor)
-
thenAccept
public ProgressCompletableFuture<java.lang.Void> thenAccept(ProgressReportingConsumer<? super T> action)
-
thenAcceptAsync
public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync(ProgressReportingConsumer<? super T> action)
-
thenAcceptAsync
public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync(ProgressReportingConsumer<? super T> action, java.util.concurrent.Executor executor)
-
thenRun
public ProgressCompletableFuture<java.lang.Void> thenRun(ProgressReportingRunnable action)
-
thenRunAsync
public ProgressCompletableFuture<java.lang.Void> thenRunAsync(ProgressReportingRunnable action)
-
thenRunAsync
public ProgressCompletableFuture<java.lang.Void> thenRunAsync(ProgressReportingRunnable action, java.util.concurrent.Executor executor)
-
whenComplete
public ProgressCompletableFuture<T> whenComplete(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action)
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action)
-
whenCompleteAsync
public ProgressCompletableFuture<T> whenCompleteAsync(ProgressReportingBiConsumer<? super T,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
-
handle
public <U> ProgressCompletableFuture<U> handle(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn)
-
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn)
-
handleAsync
public <U> ProgressCompletableFuture<U> handleAsync(ProgressReportingBiFunction<? super T,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)
-
exceptionally
public ProgressCompletableFuture<T> exceptionally(ProgressReportingFunction<java.lang.Throwable,? extends T> fn)
-
completeAsync
public ProgressCompletableFuture<T> completeAsync(ProgressReportingSupplier<? extends T> supplier, java.util.concurrent.Executor executor)
-
completeAsync
public ProgressCompletableFuture<T> completeAsync(ProgressReportingSupplier<? extends T> supplier)
-
-