Class 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 Detail

      • ASYNC_POOL

        public static final java.util.concurrent.Executor ASYNC_POOL
    • Constructor Detail

      • ProgressCompletableFuture

        public ProgressCompletableFuture()
      • ProgressCompletableFuture

        public ProgressCompletableFuture​(Progress progress)
    • Method Detail

      • complete

        public boolean complete​(T value)
        Overrides:
        complete in class java.util.concurrent.CompletableFuture<T>
      • completeExceptionally

        public boolean completeExceptionally​(java.lang.Throwable ex)
        Overrides:
        completeExceptionally in class java.util.concurrent.CompletableFuture<T>
      • newIncompleteFuture

        public <U> ProgressCompletableFuture<U> newIncompleteFuture()
        Overrides:
        newIncompleteFuture in class java.util.concurrent.CompletableFuture<T>
      • 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,
                                                                         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)
        Specified by:
        thenApply in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenApply in class java.util.concurrent.CompletableFuture<T>
      • thenApplyAsync

        public <U> ProgressCompletableFuture<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn)
        Specified by:
        thenApplyAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenApplyAsync in class java.util.concurrent.CompletableFuture<T>
      • thenApplyAsync

        public <U> ProgressCompletableFuture<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn,
                                                               java.util.concurrent.Executor executor)
        Specified by:
        thenApplyAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenApplyAsync in class java.util.concurrent.CompletableFuture<T>
      • thenAccept

        public ProgressCompletableFuture<java.lang.Void> thenAccept​(java.util.function.Consumer<? super T> action)
        Specified by:
        thenAccept in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenAccept in class java.util.concurrent.CompletableFuture<T>
      • thenAcceptAsync

        public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action)
        Specified by:
        thenAcceptAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenAcceptAsync in class java.util.concurrent.CompletableFuture<T>
      • thenAcceptAsync

        public ProgressCompletableFuture<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action,
                                                                         java.util.concurrent.Executor executor)
        Specified by:
        thenAcceptAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenAcceptAsync in class java.util.concurrent.CompletableFuture<T>
      • thenRun

        public ProgressCompletableFuture<java.lang.Void> thenRun​(java.lang.Runnable action)
        Specified by:
        thenRun in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenRun in class java.util.concurrent.CompletableFuture<T>
      • thenRunAsync

        public ProgressCompletableFuture<java.lang.Void> thenRunAsync​(java.lang.Runnable action)
        Specified by:
        thenRunAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenRunAsync in class java.util.concurrent.CompletableFuture<T>
      • thenRunAsync

        public ProgressCompletableFuture<java.lang.Void> thenRunAsync​(java.lang.Runnable action,
                                                                      java.util.concurrent.Executor executor)
        Specified by:
        thenRunAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        thenRunAsync in class java.util.concurrent.CompletableFuture<T>
      • whenComplete

        public ProgressCompletableFuture<T> whenComplete​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Specified by:
        whenComplete in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        whenComplete in class java.util.concurrent.CompletableFuture<T>
      • whenCompleteAsync

        public ProgressCompletableFuture<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Specified by:
        whenCompleteAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        whenCompleteAsync in class java.util.concurrent.CompletableFuture<T>
      • whenCompleteAsync

        public ProgressCompletableFuture<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action,
                                                              java.util.concurrent.Executor executor)
        Specified by:
        whenCompleteAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        whenCompleteAsync in class java.util.concurrent.CompletableFuture<T>
      • handle

        public <U> ProgressCompletableFuture<U> handle​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Specified by:
        handle in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        handle in class java.util.concurrent.CompletableFuture<T>
      • handleAsync

        public <U> ProgressCompletableFuture<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Specified by:
        handleAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        handleAsync in class java.util.concurrent.CompletableFuture<T>
      • handleAsync

        public <U> ProgressCompletableFuture<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn,
                                                            java.util.concurrent.Executor executor)
        Specified by:
        handleAsync in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        handleAsync in class java.util.concurrent.CompletableFuture<T>
      • toCompletableFuture

        public ProgressCompletableFuture<T> toCompletableFuture()
        Specified by:
        toCompletableFuture in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        toCompletableFuture in class java.util.concurrent.CompletableFuture<T>
      • exceptionally

        public ProgressCompletableFuture<T> exceptionally​(java.util.function.Function<java.lang.Throwable,​? extends T> fn)
        Specified by:
        exceptionally in interface java.util.concurrent.CompletionStage<T>
        Overrides:
        exceptionally in class java.util.concurrent.CompletableFuture<T>
      • completeAsync

        public ProgressCompletableFuture<T> completeAsync​(java.util.function.Supplier<? extends T> supplier,
                                                          java.util.concurrent.Executor executor)
        Overrides:
        completeAsync in class java.util.concurrent.CompletableFuture<T>
      • completeAsync

        public ProgressCompletableFuture<T> completeAsync​(java.util.function.Supplier<? extends T> supplier)
        Overrides:
        completeAsync in class java.util.concurrent.CompletableFuture<T>
      • orTimeout

        public ProgressCompletableFuture<T> orTimeout​(long timeout,
                                                      java.util.concurrent.TimeUnit unit)
        Overrides:
        orTimeout in class java.util.concurrent.CompletableFuture<T>
      • completeOnTimeout

        public ProgressCompletableFuture<T> completeOnTimeout​(T value,
                                                              long timeout,
                                                              java.util.concurrent.TimeUnit unit)
        Overrides:
        completeOnTimeout in class java.util.concurrent.CompletableFuture<T>