Class NameableCompletionStage<T>

  • All Implemented Interfaces:
    java.util.concurrent.CompletionStage<T>
    Direct Known Subclasses:
    NameableCompletableFuture

    public class NameableCompletionStage<T>
    extends java.lang.Object
    implements java.util.concurrent.CompletionStage<T>
    Naming API for CompletionStage.

    Note: all methods for NameableCompletionStage return a new NameableCompletionStage for fluent naming API. NameableCompletionStage is a CompletionStage, so can be passed on as is.

    • Constructor Summary

      Constructors 
      Constructor Description
      NameableCompletionStage​(java.util.concurrent.CompletionStage<T> underlying)
      Create a new CompletionStage with nameable completion methods.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NameableCompletionStage<java.lang.Void> acceptEither​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
      Original version of CompletionStage.acceptEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> acceptEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
      Original version of CompletionStage.acceptEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> acceptEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.acceptEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> acceptEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
      Named version of CompletionStage.acceptEitherAsync.
      NameableCompletionStage<java.lang.Void> acceptEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.acceptEitherAsync.
      NameableCompletionStage<java.lang.Void> acceptEitherNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Consumer<? super T> action)
      Named version of CompletionStage.acceptEither.
      <U> NameableCompletionStage<U> applyToEither​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn)
      Original version of CompletionStage.applyToEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> applyToEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn)
      Original version of CompletionStage.applyToEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> applyToEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn, java.util.concurrent.Executor executor)
      Original version of CompletionStage.applyToEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> applyToEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn)
      Named version of CompletionStage.applyToEitherAsync.
      <U> NameableCompletionStage<U> applyToEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn, java.util.concurrent.Executor executor)
      Named version of CompletionStage.applyToEitherAsync.
      <U> NameableCompletionStage<U> applyToEitherNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,​U> fn)
      Named version of CompletionStage.applyToEither.
      static <T> java.util.concurrent.CompletionStage<T> disableContext​(java.util.concurrent.CompletionStage<T> stage)
      Disable any Cinnamon attached context on the given CompletionStage.
      NameableCompletionStage<T> exceptionally​(java.util.function.Function<java.lang.Throwable,​? extends T> fn)
      Original version of CompletionStage.exceptionally, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<T> exceptionallyNamed​(java.lang.String name, java.util.function.Function<java.lang.Throwable,​? extends T> fn)
      Named version of CompletionStage.exceptionally.
      java.util.concurrent.CompletionStage<T> getUnderlying()
      Return the underlying CompletionStage wrapped by this NameableCompletionStage.
      <U> NameableCompletionStage<U> handle​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
      Original version of CompletionStage.handle, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
      Original version of CompletionStage.handleAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn, java.util.concurrent.Executor executor)
      Original version of CompletionStage.handleAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> handleAsyncNamed​(java.lang.String name, java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
      Named version of CompletionStage.handleAsync.
      <U> NameableCompletionStage<U> handleAsyncNamed​(java.lang.String name, java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn, java.util.concurrent.Executor executor)
      Named version of CompletionStage.handleAsync.
      <U> NameableCompletionStage<U> handleNamed​(java.lang.String name, java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
      Named version of CompletionStage.handle.
      static <U> NameableCompletionStage<U> nameable​(java.util.concurrent.CompletionStage<U> stage)
      Create a new CompletionStage with nameable completion methods.
      NameableCompletionStage<java.lang.Void> runAfterBoth​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Original version of CompletionStage.runAfterBoth, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterBothAsync​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Original version of CompletionStage.runAfterBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterBothAsync​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.runAfterBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterBothAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Named version of CompletionStage.runAfterBothAsync.
      NameableCompletionStage<java.lang.Void> runAfterBothAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.runAfterBothAsync.
      NameableCompletionStage<java.lang.Void> runAfterBothNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Named version of CompletionStage.runAfterBoth.
      NameableCompletionStage<java.lang.Void> runAfterEither​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Original version of CompletionStage.runAfterEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterEitherAsync​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Original version of CompletionStage.runAfterEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterEitherAsync​(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.runAfterEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> runAfterEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Named version of CompletionStage.runAfterEitherAsync.
      NameableCompletionStage<java.lang.Void> runAfterEitherAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.runAfterEitherAsync.
      NameableCompletionStage<java.lang.Void> runAfterEitherNamed​(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
      Named version of CompletionStage.runAfterEither.
      NameableCompletionStage<java.lang.Void> thenAccept​(java.util.function.Consumer<? super T> action)
      Original version of CompletionStage.thenAccept, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action)
      Original version of CompletionStage.thenAcceptAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenAcceptAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenAcceptAsyncNamed​(java.lang.String name, java.util.function.Consumer<? super T> action)
      Named version of CompletionStage.thenAcceptAsync.
      NameableCompletionStage<java.lang.Void> thenAcceptAsyncNamed​(java.lang.String name, java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenAcceptAsync.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBoth​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action)
      Original version of CompletionStage.thenAcceptBoth, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsync​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action)
      Original version of CompletionStage.thenAcceptBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsync​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenAcceptBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action)
      Named version of CompletionStage.thenAcceptBothAsync.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenAcceptBothAsync.
      <U> NameableCompletionStage<java.lang.Void> thenAcceptBothNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super T,​? super U> action)
      Named version of CompletionStage.thenAcceptBoth.
      NameableCompletionStage<java.lang.Void> thenAcceptNamed​(java.lang.String name, java.util.function.Consumer<? super T> action)
      Named version of CompletionStage.thenAccept.
      <U> NameableCompletionStage<U> thenApply​(java.util.function.Function<? super T,​? extends U> fn)
      Original version of CompletionStage.thenApply, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn)
      Original version of CompletionStage.thenApplyAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenApplyAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenApplyAsyncNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends U> fn)
      Named version of CompletionStage.thenApplyAsync.
      <U> NameableCompletionStage<U> thenApplyAsyncNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends U> fn, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenApplyAsync.
      <U> NameableCompletionStage<U> thenApplyNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends U> fn)
      Named version of CompletionStage.thenApply.
      <U,​V>
      NameableCompletionStage<V>
      thenCombine​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
      Original version of CompletionStage.thenCombine, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U,​V>
      NameableCompletionStage<V>
      thenCombineAsync​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
      Original version of CompletionStage.thenCombineAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U,​V>
      NameableCompletionStage<V>
      thenCombineAsync​(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenCombineAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U,​V>
      NameableCompletionStage<V>
      thenCombineAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
      Named version of CompletionStage.thenCombineAsync.
      <U,​V>
      NameableCompletionStage<V>
      thenCombineAsyncNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenCombineAsync.
      <U,​V>
      NameableCompletionStage<V>
      thenCombineNamed​(java.lang.String name, java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
      Named version of CompletionStage.thenCombine.
      <U> NameableCompletionStage<U> thenCompose​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
      Original version of CompletionStage.thenCompose, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
      Original version of CompletionStage.thenComposeAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenComposeAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      <U> NameableCompletionStage<U> thenComposeAsyncNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
      Named version of CompletionStage.thenComposeAsync.
      <U> NameableCompletionStage<U> thenComposeAsyncNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenComposeAsync.
      <U> NameableCompletionStage<U> thenComposeNamed​(java.lang.String name, java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
      Named version of CompletionStage.thenCompose.
      NameableCompletionStage<java.lang.Void> thenRun​(java.lang.Runnable action)
      Original version of CompletionStage.thenRun, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenRunAsync​(java.lang.Runnable action)
      Original version of CompletionStage.thenRunAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenRunAsync​(java.lang.Runnable action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.thenRunAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<java.lang.Void> thenRunAsyncNamed​(java.lang.String name, java.lang.Runnable action)
      Named version of CompletionStage.thenRunAsync.
      NameableCompletionStage<java.lang.Void> thenRunAsyncNamed​(java.lang.String name, java.lang.Runnable action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.thenRunAsync.
      NameableCompletionStage<java.lang.Void> thenRunNamed​(java.lang.String name, java.lang.Runnable action)
      Named version of CompletionStage.thenRun.
      java.util.concurrent.CompletableFuture<T> toCompletableFuture()
      Original version of CompletionStage.toCompletableFuture.
      java.util.concurrent.CompletableFuture<T> toCompletableFutureNamed​(java.lang.String name)
      Named version of CompletionStage.toCompletableFuture.
      NameableCompletionStage<T> whenComplete​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
      Original version of CompletionStage.whenComplete, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
      Original version of CompletionStage.whenCompleteAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
      Original version of CompletionStage.whenCompleteAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
      NameableCompletionStage<T> whenCompleteAsyncNamed​(java.lang.String name, java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
      Named version of CompletionStage.whenCompleteAsync.
      NameableCompletionStage<T> whenCompleteAsyncNamed​(java.lang.String name, java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
      Named version of CompletionStage.whenCompleteAsync.
      NameableCompletionStage<T> whenCompleteNamed​(java.lang.String name, java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
      Named version of CompletionStage.whenComplete.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameableCompletionStage

        public NameableCompletionStage​(java.util.concurrent.CompletionStage<T> underlying)
        Create a new CompletionStage with nameable completion methods.
        Parameters:
        underlying - the CompletionStage to wrap with nameable methods
    • Method Detail

      • getUnderlying

        public java.util.concurrent.CompletionStage<T> getUnderlying()
        Return the underlying CompletionStage wrapped by this NameableCompletionStage.
        Returns:
        the underlying CompletionStage
      • nameable

        public static <U> NameableCompletionStage<U> nameable​(java.util.concurrent.CompletionStage<U> stage)
        Create a new CompletionStage with nameable completion methods.

        Note: returns the original stage if already nameable.

        Type Parameters:
        U - the CompletionStage's type
        Parameters:
        stage - the CompletionStage to extend with named variations
        Returns:
        a CompletionStage with nameable completion methods
      • thenApply

        public <U> NameableCompletionStage<U> thenApply​(java.util.function.Function<? super T,​? extends U> fn)
        Original version of CompletionStage.thenApply, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenApply in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.thenApply
        Returns:
        the new (unnamed) CompletionStage
      • thenApplyNamed

        public <U> NameableCompletionStage<U> thenApplyNamed​(java.lang.String name,
                                                             java.util.function.Function<? super T,​? extends U> fn)
        Named version of CompletionStage.thenApply.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.thenApply
        Returns:
        the new (named) CompletionStage
      • thenApplyAsync

        public <U> NameableCompletionStage<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn)
        Original version of CompletionStage.thenApplyAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenApplyAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.thenApplyAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenApplyAsyncNamed

        public <U> NameableCompletionStage<U> thenApplyAsyncNamed​(java.lang.String name,
                                                                  java.util.function.Function<? super T,​? extends U> fn)
        Named version of CompletionStage.thenApplyAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.thenApplyAsync
        Returns:
        the new (named) CompletionStage
      • thenApplyAsync

        public <U> NameableCompletionStage<U> thenApplyAsync​(java.util.function.Function<? super T,​? extends U> fn,
                                                             java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenApplyAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenApplyAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.thenApplyAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenApplyAsyncNamed

        public <U> NameableCompletionStage<U> thenApplyAsyncNamed​(java.lang.String name,
                                                                  java.util.function.Function<? super T,​? extends U> fn,
                                                                  java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenApplyAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.thenApplyAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (named) CompletionStage
      • thenAccept

        public NameableCompletionStage<java.lang.Void> thenAccept​(java.util.function.Consumer<? super T> action)
        Original version of CompletionStage.thenAccept, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAccept in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenAccept
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptNamed

        public NameableCompletionStage<java.lang.Void> thenAcceptNamed​(java.lang.String name,
                                                                       java.util.function.Consumer<? super T> action)
        Named version of CompletionStage.thenAccept.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenAccept
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptAsync

        public NameableCompletionStage<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action)
        Original version of CompletionStage.thenAcceptAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAcceptAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenAcceptAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptAsyncNamed

        public NameableCompletionStage<java.lang.Void> thenAcceptAsyncNamed​(java.lang.String name,
                                                                            java.util.function.Consumer<? super T> action)
        Named version of CompletionStage.thenAcceptAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenAcceptAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptAsync

        public NameableCompletionStage<java.lang.Void> thenAcceptAsync​(java.util.function.Consumer<? super T> action,
                                                                       java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenAcceptAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAcceptAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenAcceptAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptAsyncNamed

        public NameableCompletionStage<java.lang.Void> thenAcceptAsyncNamed​(java.lang.String name,
                                                                            java.util.function.Consumer<? super T> action,
                                                                            java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenAcceptAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenAcceptAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenRun

        public NameableCompletionStage<java.lang.Void> thenRun​(java.lang.Runnable action)
        Original version of CompletionStage.thenRun, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenRun in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenRun
        Returns:
        the new (unnamed) CompletionStage
      • thenRunNamed

        public NameableCompletionStage<java.lang.Void> thenRunNamed​(java.lang.String name,
                                                                    java.lang.Runnable action)
        Named version of CompletionStage.thenRun.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenRun
        Returns:
        the new (unnamed) CompletionStage
      • thenRunAsync

        public NameableCompletionStage<java.lang.Void> thenRunAsync​(java.lang.Runnable action)
        Original version of CompletionStage.thenRunAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenRunAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenRunAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenRunAsyncNamed

        public NameableCompletionStage<java.lang.Void> thenRunAsyncNamed​(java.lang.String name,
                                                                         java.lang.Runnable action)
        Named version of CompletionStage.thenRunAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenRunAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenRunAsync

        public NameableCompletionStage<java.lang.Void> thenRunAsync​(java.lang.Runnable action,
                                                                    java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenRunAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenRunAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.thenRunAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenRunAsyncNamed

        public NameableCompletionStage<java.lang.Void> thenRunAsyncNamed​(java.lang.String name,
                                                                         java.lang.Runnable action,
                                                                         java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenRunAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.thenRunAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenCombine

        public <U,​V> NameableCompletionStage<V> thenCombine​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                  java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
        Original version of CompletionStage.thenCombine, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenCombine in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.thenCombine
        fn - the function for CompletionStage.thenCombine
        Returns:
        the new (unnamed) CompletionStage
      • thenCombineNamed

        public <U,​V> NameableCompletionStage<V> thenCombineNamed​(java.lang.String name,
                                                                       java.util.concurrent.CompletionStage<? extends U> other,
                                                                       java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
        Named version of CompletionStage.thenCombine.
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenCombine
        fn - the function for CompletionStage.thenCombine
        Returns:
        the new (unnamed) CompletionStage
      • thenCombineAsync

        public <U,​V> NameableCompletionStage<V> thenCombineAsync​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                       java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
        Original version of CompletionStage.thenCombineAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenCombineAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.thenCombineAsync
        fn - the function for CompletionStage.thenCombineAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenCombineAsyncNamed

        public <U,​V> NameableCompletionStage<V> thenCombineAsyncNamed​(java.lang.String name,
                                                                            java.util.concurrent.CompletionStage<? extends U> other,
                                                                            java.util.function.BiFunction<? super T,​? super U,​? extends V> fn)
        Named version of CompletionStage.thenCombineAsync.
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenCombineAsync
        fn - the function for CompletionStage.thenCombineAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenCombineAsync

        public <U,​V> NameableCompletionStage<V> thenCombineAsync​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                       java.util.function.BiFunction<? super T,​? super U,​? extends V> fn,
                                                                       java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenCombineAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenCombineAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.thenCombineAsync
        fn - the function for CompletionStage.thenCombineAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenCombineAsyncNamed

        public <U,​V> NameableCompletionStage<V> thenCombineAsyncNamed​(java.lang.String name,
                                                                            java.util.concurrent.CompletionStage<? extends U> other,
                                                                            java.util.function.BiFunction<? super T,​? super U,​? extends V> fn,
                                                                            java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenCombineAsync.
        Type Parameters:
        U - the type of the other CompletionStage's result
        V - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenCombineAsync
        fn - the function for CompletionStage.thenCombineAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBoth

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBoth​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                          java.util.function.BiConsumer<? super T,​? super U> action)
        Original version of CompletionStage.thenAcceptBoth, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAcceptBoth in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        other - the other CompletionStage for CompletionStage.thenAcceptBoth
        action - the action for CompletionStage.thenAcceptBoth
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBothNamed

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBothNamed​(java.lang.String name,
                                                                               java.util.concurrent.CompletionStage<? extends U> other,
                                                                               java.util.function.BiConsumer<? super T,​? super U> action)
        Named version of CompletionStage.thenAcceptBoth.
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenAcceptBoth
        action - the action for CompletionStage.thenAcceptBoth
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBothAsync

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsync​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                               java.util.function.BiConsumer<? super T,​? super U> action)
        Original version of CompletionStage.thenAcceptBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAcceptBothAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        other - the other CompletionStage for CompletionStage.thenAcceptBothAsync
        action - the action for CompletionStage.thenAcceptBothAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBothAsyncNamed

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsyncNamed​(java.lang.String name,
                                                                                    java.util.concurrent.CompletionStage<? extends U> other,
                                                                                    java.util.function.BiConsumer<? super T,​? super U> action)
        Named version of CompletionStage.thenAcceptBothAsync.
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenAcceptBothAsync
        action - the action for CompletionStage.thenAcceptBothAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBothAsync

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsync​(java.util.concurrent.CompletionStage<? extends U> other,
                                                                               java.util.function.BiConsumer<? super T,​? super U> action,
                                                                               java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenAcceptBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenAcceptBothAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        other - the other CompletionStage for CompletionStage.thenAcceptBothAsync
        action - the action for CompletionStage.thenAcceptBothAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenAcceptBothAsyncNamed

        public <U> NameableCompletionStage<java.lang.Void> thenAcceptBothAsyncNamed​(java.lang.String name,
                                                                                    java.util.concurrent.CompletionStage<? extends U> other,
                                                                                    java.util.function.BiConsumer<? super T,​? super U> action,
                                                                                    java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenAcceptBothAsync.
        Type Parameters:
        U - the type of the other CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.thenAcceptBothAsync
        action - the action for CompletionStage.thenAcceptBothAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBoth

        public NameableCompletionStage<java.lang.Void> runAfterBoth​(java.util.concurrent.CompletionStage<?> other,
                                                                    java.lang.Runnable action)
        Original version of CompletionStage.runAfterBoth, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterBoth in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterBoth
        action - the action for CompletionStage.runAfterBoth
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBothNamed

        public NameableCompletionStage<java.lang.Void> runAfterBothNamed​(java.lang.String name,
                                                                         java.util.concurrent.CompletionStage<?> other,
                                                                         java.lang.Runnable action)
        Named version of CompletionStage.runAfterBoth.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterBoth
        action - the action for CompletionStage.runAfterBoth
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBothAsync

        public NameableCompletionStage<java.lang.Void> runAfterBothAsync​(java.util.concurrent.CompletionStage<?> other,
                                                                         java.lang.Runnable action)
        Original version of CompletionStage.runAfterBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterBothAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterBothAsync
        action - the action for CompletionStage.runAfterBothAsync
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBothAsyncNamed

        public NameableCompletionStage<java.lang.Void> runAfterBothAsyncNamed​(java.lang.String name,
                                                                              java.util.concurrent.CompletionStage<?> other,
                                                                              java.lang.Runnable action)
        Named version of CompletionStage.runAfterBothAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterBothAsync
        action - the action for CompletionStage.runAfterBothAsync
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBothAsync

        public NameableCompletionStage<java.lang.Void> runAfterBothAsync​(java.util.concurrent.CompletionStage<?> other,
                                                                         java.lang.Runnable action,
                                                                         java.util.concurrent.Executor executor)
        Original version of CompletionStage.runAfterBothAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterBothAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterBothAsync
        action - the action for CompletionStage.runAfterBothAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • runAfterBothAsyncNamed

        public NameableCompletionStage<java.lang.Void> runAfterBothAsyncNamed​(java.lang.String name,
                                                                              java.util.concurrent.CompletionStage<?> other,
                                                                              java.lang.Runnable action,
                                                                              java.util.concurrent.Executor executor)
        Named version of CompletionStage.runAfterBothAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterBothAsync
        action - the action for CompletionStage.runAfterBothAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • applyToEither

        public <U> NameableCompletionStage<U> applyToEither​(java.util.concurrent.CompletionStage<? extends T> other,
                                                            java.util.function.Function<? super T,​U> fn)
        Original version of CompletionStage.applyToEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        applyToEither in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.applyToEither
        fn - the function for CompletionStage.applyToEither
        Returns:
        the new (unnamed) CompletionStage
      • applyToEitherNamed

        public <U> NameableCompletionStage<U> applyToEitherNamed​(java.lang.String name,
                                                                 java.util.concurrent.CompletionStage<? extends T> other,
                                                                 java.util.function.Function<? super T,​U> fn)
        Named version of CompletionStage.applyToEither.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.applyToEither
        fn - the function for CompletionStage.applyToEither
        Returns:
        the new (unnamed) CompletionStage
      • applyToEitherAsync

        public <U> NameableCompletionStage<U> applyToEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other,
                                                                 java.util.function.Function<? super T,​U> fn)
        Original version of CompletionStage.applyToEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        applyToEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.applyToEitherAsync
        fn - the function for CompletionStage.applyToEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • applyToEitherAsyncNamed

        public <U> NameableCompletionStage<U> applyToEitherAsyncNamed​(java.lang.String name,
                                                                      java.util.concurrent.CompletionStage<? extends T> other,
                                                                      java.util.function.Function<? super T,​U> fn)
        Named version of CompletionStage.applyToEitherAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.applyToEitherAsync
        fn - the function for CompletionStage.applyToEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • applyToEitherAsync

        public <U> NameableCompletionStage<U> applyToEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other,
                                                                 java.util.function.Function<? super T,​U> fn,
                                                                 java.util.concurrent.Executor executor)
        Original version of CompletionStage.applyToEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        applyToEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        other - the other CompletionStage for CompletionStage.applyToEitherAsync
        fn - the function for CompletionStage.applyToEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • applyToEitherAsyncNamed

        public <U> NameableCompletionStage<U> applyToEitherAsyncNamed​(java.lang.String name,
                                                                      java.util.concurrent.CompletionStage<? extends T> other,
                                                                      java.util.function.Function<? super T,​U> fn,
                                                                      java.util.concurrent.Executor executor)
        Named version of CompletionStage.applyToEitherAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.applyToEitherAsync
        fn - the function for CompletionStage.applyToEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • acceptEither

        public NameableCompletionStage<java.lang.Void> acceptEither​(java.util.concurrent.CompletionStage<? extends T> other,
                                                                    java.util.function.Consumer<? super T> action)
        Original version of CompletionStage.acceptEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        acceptEither in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.acceptEither
        action - the action for CompletionStage.acceptEither
        Returns:
        the new (unnamed) CompletionStage
      • acceptEitherNamed

        public NameableCompletionStage<java.lang.Void> acceptEitherNamed​(java.lang.String name,
                                                                         java.util.concurrent.CompletionStage<? extends T> other,
                                                                         java.util.function.Consumer<? super T> action)
        Named version of CompletionStage.acceptEither.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.acceptEither
        action - the action for CompletionStage.acceptEither
        Returns:
        the new (unnamed) CompletionStage
      • acceptEitherAsync

        public NameableCompletionStage<java.lang.Void> acceptEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other,
                                                                         java.util.function.Consumer<? super T> action)
        Original version of CompletionStage.acceptEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        acceptEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.acceptEitherAsync
        action - the action for CompletionStage.acceptEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • acceptEitherAsyncNamed

        public NameableCompletionStage<java.lang.Void> acceptEitherAsyncNamed​(java.lang.String name,
                                                                              java.util.concurrent.CompletionStage<? extends T> other,
                                                                              java.util.function.Consumer<? super T> action)
        Named version of CompletionStage.acceptEitherAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.acceptEitherAsync
        action - the action for CompletionStage.acceptEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • acceptEitherAsync

        public NameableCompletionStage<java.lang.Void> acceptEitherAsync​(java.util.concurrent.CompletionStage<? extends T> other,
                                                                         java.util.function.Consumer<? super T> action,
                                                                         java.util.concurrent.Executor executor)
        Original version of CompletionStage.acceptEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        acceptEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.acceptEitherAsync
        action - the action for CompletionStage.acceptEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • acceptEitherAsyncNamed

        public NameableCompletionStage<java.lang.Void> acceptEitherAsyncNamed​(java.lang.String name,
                                                                              java.util.concurrent.CompletionStage<? extends T> other,
                                                                              java.util.function.Consumer<? super T> action,
                                                                              java.util.concurrent.Executor executor)
        Named version of CompletionStage.acceptEitherAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.acceptEitherAsync
        action - the action for CompletionStage.acceptEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEither

        public NameableCompletionStage<java.lang.Void> runAfterEither​(java.util.concurrent.CompletionStage<?> other,
                                                                      java.lang.Runnable action)
        Original version of CompletionStage.runAfterEither, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterEither in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterEither
        action - the action for CompletionStage.runAfterEither
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEitherNamed

        public NameableCompletionStage<java.lang.Void> runAfterEitherNamed​(java.lang.String name,
                                                                           java.util.concurrent.CompletionStage<?> other,
                                                                           java.lang.Runnable action)
        Named version of CompletionStage.runAfterEither.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterEither
        action - the action for CompletionStage.runAfterEither
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEitherAsync

        public NameableCompletionStage<java.lang.Void> runAfterEitherAsync​(java.util.concurrent.CompletionStage<?> other,
                                                                           java.lang.Runnable action)
        Original version of CompletionStage.runAfterEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterEitherAsync
        action - the action for CompletionStage.runAfterEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEitherAsyncNamed

        public NameableCompletionStage<java.lang.Void> runAfterEitherAsyncNamed​(java.lang.String name,
                                                                                java.util.concurrent.CompletionStage<?> other,
                                                                                java.lang.Runnable action)
        Named version of CompletionStage.runAfterEitherAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterEitherAsync
        action - the action for CompletionStage.runAfterEitherAsync
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEitherAsync

        public NameableCompletionStage<java.lang.Void> runAfterEitherAsync​(java.util.concurrent.CompletionStage<?> other,
                                                                           java.lang.Runnable action,
                                                                           java.util.concurrent.Executor executor)
        Original version of CompletionStage.runAfterEitherAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        runAfterEitherAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        other - the other CompletionStage for CompletionStage.runAfterEitherAsync
        action - the action for CompletionStage.runAfterEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • runAfterEitherAsyncNamed

        public NameableCompletionStage<java.lang.Void> runAfterEitherAsyncNamed​(java.lang.String name,
                                                                                java.util.concurrent.CompletionStage<?> other,
                                                                                java.lang.Runnable action,
                                                                                java.util.concurrent.Executor executor)
        Named version of CompletionStage.runAfterEitherAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        other - the other CompletionStage for CompletionStage.runAfterEitherAsync
        action - the action for CompletionStage.runAfterEitherAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenCompose

        public <U> NameableCompletionStage<U> thenCompose​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Original version of CompletionStage.thenCompose, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenCompose in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        fn - the function for CompletionStage.thenCompose
        Returns:
        the new (unnamed) CompletionStage
      • thenComposeNamed

        public <U> NameableCompletionStage<U> thenComposeNamed​(java.lang.String name,
                                                               java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Named version of CompletionStage.thenCompose.
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.thenCompose
        Returns:
        the new (unnamed) CompletionStage
      • thenComposeAsync

        public <U> NameableCompletionStage<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Original version of CompletionStage.thenComposeAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenComposeAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        fn - the function forCompletionStage.thenComposeAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenComposeAsyncNamed

        public <U> NameableCompletionStage<U> thenComposeAsyncNamed​(java.lang.String name,
                                                                    java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn)
        Named version of CompletionStage.thenComposeAsync.
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function forCompletionStage.thenComposeAsync
        Returns:
        the new (unnamed) CompletionStage
      • thenComposeAsync

        public <U> NameableCompletionStage<U> thenComposeAsync​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn,
                                                               java.util.concurrent.Executor executor)
        Original version of CompletionStage.thenComposeAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        thenComposeAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        fn - the function for CompletionStage.thenComposeAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • thenComposeAsyncNamed

        public <U> NameableCompletionStage<U> thenComposeAsyncNamed​(java.lang.String name,
                                                                    java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<U>> fn,
                                                                    java.util.concurrent.Executor executor)
        Named version of CompletionStage.thenComposeAsync.
        Type Parameters:
        U - the type of the returned CompletionStage's result
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.thenComposeAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • exceptionally

        public NameableCompletionStage<T> exceptionally​(java.util.function.Function<java.lang.Throwable,​? extends T> fn)
        Original version of CompletionStage.exceptionally, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        exceptionally in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        fn - the function for CompletionStage.exceptionally
        Returns:
        the new (unnamed) CompletionStage
      • exceptionallyNamed

        public NameableCompletionStage<T> exceptionallyNamed​(java.lang.String name,
                                                             java.util.function.Function<java.lang.Throwable,​? extends T> fn)
        Named version of CompletionStage.exceptionally.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.exceptionally
        Returns:
        the new (unnamed) CompletionStage
      • whenComplete

        public NameableCompletionStage<T> whenComplete​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Original version of CompletionStage.whenComplete, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        whenComplete in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.whenComplete
        Returns:
        the new (unnamed) CompletionStage
      • whenCompleteNamed

        public NameableCompletionStage<T> whenCompleteNamed​(java.lang.String name,
                                                            java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Named version of CompletionStage.whenComplete.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.whenComplete
        Returns:
        the new (unnamed) CompletionStage
      • whenCompleteAsync

        public NameableCompletionStage<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Original version of CompletionStage.whenCompleteAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        whenCompleteAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.whenCompleteAsync
        Returns:
        the new (unnamed) CompletionStage
      • whenCompleteAsyncNamed

        public NameableCompletionStage<T> whenCompleteAsyncNamed​(java.lang.String name,
                                                                 java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action)
        Named version of CompletionStage.whenCompleteAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.whenCompleteAsync
        Returns:
        the new (unnamed) CompletionStage
      • whenCompleteAsync

        public NameableCompletionStage<T> whenCompleteAsync​(java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action,
                                                            java.util.concurrent.Executor executor)
        Original version of CompletionStage.whenCompleteAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        whenCompleteAsync in interface java.util.concurrent.CompletionStage<T>
        Parameters:
        action - the action for CompletionStage.whenCompleteAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • whenCompleteAsyncNamed

        public NameableCompletionStage<T> whenCompleteAsyncNamed​(java.lang.String name,
                                                                 java.util.function.BiConsumer<? super T,​? super java.lang.Throwable> action,
                                                                 java.util.concurrent.Executor executor)
        Named version of CompletionStage.whenCompleteAsync.
        Parameters:
        name - the name for the new CompletionStage and completion callback
        action - the action for CompletionStage.whenCompleteAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • handle

        public <U> NameableCompletionStage<U> handle​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Original version of CompletionStage.handle, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        handle in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.handle
        Returns:
        the new (unnamed) CompletionStage
      • handleNamed

        public <U> NameableCompletionStage<U> handleNamed​(java.lang.String name,
                                                          java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Named version of CompletionStage.handle.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.handle
        Returns:
        the new (unnamed) CompletionStage
      • handleAsync

        public <U> NameableCompletionStage<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Original version of CompletionStage.handleAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        handleAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.handleAsync
        Returns:
        the new (unnamed) CompletionStage
      • handleAsyncNamed

        public <U> NameableCompletionStage<U> handleAsyncNamed​(java.lang.String name,
                                                               java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn)
        Named version of CompletionStage.handleAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.handleAsync
        Returns:
        the new (unnamed) CompletionStage
      • handleAsync

        public <U> NameableCompletionStage<U> handleAsync​(java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn,
                                                          java.util.concurrent.Executor executor)
        Original version of CompletionStage.handleAsync, but returns a NameableCompletionStage where subsequent method calls can use named variations.
        Specified by:
        handleAsync in interface java.util.concurrent.CompletionStage<T>
        Type Parameters:
        U - the function's return type
        Parameters:
        fn - the function for CompletionStage.handleAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • handleAsyncNamed

        public <U> NameableCompletionStage<U> handleAsyncNamed​(java.lang.String name,
                                                               java.util.function.BiFunction<? super T,​java.lang.Throwable,​? extends U> fn,
                                                               java.util.concurrent.Executor executor)
        Named version of CompletionStage.handleAsync.
        Type Parameters:
        U - the function's return type
        Parameters:
        name - the name for the new CompletionStage and completion callback
        fn - the function for CompletionStage.handleAsync
        executor - the executor to use for asynchronous execution
        Returns:
        the new (unnamed) CompletionStage
      • toCompletableFuture

        public java.util.concurrent.CompletableFuture<T> toCompletableFuture()
        Original version of CompletionStage.toCompletableFuture.
        Specified by:
        toCompletableFuture in interface java.util.concurrent.CompletionStage<T>
        Returns:
        the CompletableFuture
      • toCompletableFutureNamed

        public java.util.concurrent.CompletableFuture<T> toCompletableFutureNamed​(java.lang.String name)
        Named version of CompletionStage.toCompletableFuture.

        Note: only applies the name when this method returns a new CompletableFuture.

        Parameters:
        name - the name for the CompletableFuture (if new future created)
        Returns:
        the CompletableFuture
      • disableContext

        public static <T> java.util.concurrent.CompletionStage<T> disableContext​(java.util.concurrent.CompletionStage<T> stage)
        Disable any Cinnamon attached context on the given CompletionStage.

        Can be used if the CompletionStage will be cached.

        Type Parameters:
        T - the type of the value
        Parameters:
        stage - the CompletionStage to disable contexts for
        Returns:
        the original CompletionStage with context disabled