Class NameableCompletionStage<T>
- java.lang.Object
-
- com.lightbend.cinnamon.java.future.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.acceptEither
.<U> NameableCompletionStage<U>
applyToEither(java.util.concurrent.CompletionStage<? extends T> other, java.util.function.Function<? super T,U> fn)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.applyToEither
.static <T> java.util.concurrent.CompletionStage<T>
disableContext(java.util.concurrent.CompletionStage<T> stage)
Disable any Cinnamon attached context on the givenCompletionStage
.NameableCompletionStage<T>
exceptionally(java.util.function.Function<java.lang.Throwable,? extends T> fn)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.handleAsync
.<U> NameableCompletionStage<U>
handleNamed(java.lang.String name, java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U> fn)
Named version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.runAfterBothAsync
.NameableCompletionStage<java.lang.Void>
runAfterBothNamed(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
Named version ofCompletionStage.runAfterBoth
.NameableCompletionStage<java.lang.Void>
runAfterEither(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.runAfterEitherAsync
.NameableCompletionStage<java.lang.Void>
runAfterEitherNamed(java.lang.String name, java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
Named version ofCompletionStage.runAfterEither
.NameableCompletionStage<java.lang.Void>
thenAccept(java.util.function.Consumer<? super T> action)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenAcceptAsync
.NameableCompletionStage<java.lang.Void>
thenAcceptAsyncNamed(java.lang.String name, java.util.function.Consumer<? super T> action, java.util.concurrent.Executor executor)
Named version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenAcceptBoth
.NameableCompletionStage<java.lang.Void>
thenAcceptNamed(java.lang.String name, java.util.function.Consumer<? super T> action)
Named version ofCompletionStage.thenAccept
.<U> NameableCompletionStage<U>
thenApply(java.util.function.Function<? super T,? extends U> fn)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenApplyAsync
.<U> NameableCompletionStage<U>
thenApplyNamed(java.lang.String name, java.util.function.Function<? super T,? extends U> fn)
Named version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenCombine
.<U> NameableCompletionStage<U>
thenCompose(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenComposeAsync
.<U> NameableCompletionStage<U>
thenComposeNamed(java.lang.String name, java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>> fn)
Named version ofCompletionStage.thenCompose
.NameableCompletionStage<java.lang.Void>
thenRun(java.lang.Runnable action)
Original version ofCompletionStage.thenRun
, but returns a NameableCompletionStage where subsequent method calls can use named variations.NameableCompletionStage<java.lang.Void>
thenRunAsync(java.lang.Runnable action)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.thenRunAsync
.NameableCompletionStage<java.lang.Void>
thenRunAsyncNamed(java.lang.String name, java.lang.Runnable action, java.util.concurrent.Executor executor)
Named version ofCompletionStage.thenRunAsync
.NameableCompletionStage<java.lang.Void>
thenRunNamed(java.lang.String name, java.lang.Runnable action)
Named version ofCompletionStage.thenRun
.java.util.concurrent.CompletableFuture<T>
toCompletableFuture()
Original version ofCompletionStage.toCompletableFuture
.java.util.concurrent.CompletableFuture<T>
toCompletableFutureNamed(java.lang.String name)
Named version ofCompletionStage.toCompletableFuture
.NameableCompletionStage<T>
whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
Original version ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.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 ofCompletionStage.whenCompleteAsync
.NameableCompletionStage<T>
whenCompleteNamed(java.lang.String name, java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
Named version ofCompletionStage.whenComplete
.
-
-
-
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 ofCompletionStage.thenApply
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenApply
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.thenApply
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.thenApply
- Returns:
- the new (named) CompletionStage
-
thenApplyAsync
public <U> NameableCompletionStage<U> thenApplyAsync(java.util.function.Function<? super T,? extends U> fn)
Original version ofCompletionStage.thenApplyAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenApplyAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.thenApplyAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.thenApplyAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenApplyAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.thenApplyAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.thenAccept
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAccept
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.thenAccept
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.thenAccept
- Returns:
- the new (unnamed) CompletionStage
-
thenAcceptAsync
public NameableCompletionStage<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T> action)
Original version ofCompletionStage.thenAcceptAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAcceptAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.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 ofCompletionStage.thenAcceptAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAcceptAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.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 ofCompletionStage.thenRun
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenRun
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.thenRun
- Returns:
- the new (unnamed) CompletionStage
-
thenRunNamed
public NameableCompletionStage<java.lang.Void> thenRunNamed(java.lang.String name, java.lang.Runnable action)
Named version ofCompletionStage.thenRun
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.thenRun
- Returns:
- the new (unnamed) CompletionStage
-
thenRunAsync
public NameableCompletionStage<java.lang.Void> thenRunAsync(java.lang.Runnable action)
Original version ofCompletionStage.thenRunAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenRunAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.thenRunAsync
- Returns:
- the new (unnamed) CompletionStage
-
thenRunAsyncNamed
public NameableCompletionStage<java.lang.Void> thenRunAsyncNamed(java.lang.String name, java.lang.Runnable action)
Named version ofCompletionStage.thenRunAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.thenRunAsync
- Returns:
- the new (unnamed) CompletionStage
-
thenRunAsync
public NameableCompletionStage<java.lang.Void> thenRunAsync(java.lang.Runnable action, java.util.concurrent.Executor executor)
Original version ofCompletionStage.thenRunAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenRunAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.thenRunAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.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 ofCompletionStage.thenCombine
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenCombine
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.thenCombine
fn
- the function forCompletionStage.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 ofCompletionStage.thenCombine
.- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenCombine
fn
- the function forCompletionStage.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 ofCompletionStage.thenCombineAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenCombineAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.thenCombineAsync
fn
- the function forCompletionStage.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 ofCompletionStage.thenCombineAsync
.- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenCombineAsync
fn
- the function forCompletionStage.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 ofCompletionStage.thenCombineAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenCombineAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.thenCombineAsync
fn
- the function forCompletionStage.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 ofCompletionStage.thenCombineAsync
.- Type Parameters:
U
- the type of the other CompletionStage's resultV
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenCombineAsync
fn
- the function forCompletionStage.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 ofCompletionStage.thenAcceptBoth
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAcceptBoth
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
other
- the other CompletionStage forCompletionStage.thenAcceptBoth
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptBoth
.- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenAcceptBoth
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptBothAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAcceptBothAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
other
- the other CompletionStage forCompletionStage.thenAcceptBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptBothAsync
.- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenAcceptBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptBothAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenAcceptBothAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
other
- the other CompletionStage forCompletionStage.thenAcceptBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.thenAcceptBothAsync
.- Type Parameters:
U
- the type of the other CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.thenAcceptBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterBoth
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterBoth
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterBoth
action
- the action forCompletionStage.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 ofCompletionStage.runAfterBoth
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterBoth
action
- the action forCompletionStage.runAfterBoth
- Returns:
- the new (unnamed) CompletionStage
-
runAfterBothAsync
public NameableCompletionStage<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
Original version ofCompletionStage.runAfterBothAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterBothAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterBothAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterBothAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterBothAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterBothAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterBothAsync
action
- the action forCompletionStage.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 ofCompletionStage.applyToEither
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
applyToEither
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.applyToEither
fn
- the function forCompletionStage.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 ofCompletionStage.applyToEither
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.applyToEither
fn
- the function forCompletionStage.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 ofCompletionStage.applyToEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
applyToEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.applyToEitherAsync
fn
- the function forCompletionStage.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 ofCompletionStage.applyToEitherAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.applyToEitherAsync
fn
- the function forCompletionStage.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 ofCompletionStage.applyToEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
applyToEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
other
- the other CompletionStage forCompletionStage.applyToEitherAsync
fn
- the function forCompletionStage.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 ofCompletionStage.applyToEitherAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.applyToEitherAsync
fn
- the function forCompletionStage.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 ofCompletionStage.acceptEither
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
acceptEither
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.acceptEither
action
- the action forCompletionStage.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 ofCompletionStage.acceptEither
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.acceptEither
action
- the action forCompletionStage.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 ofCompletionStage.acceptEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
acceptEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.acceptEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.acceptEitherAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.acceptEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.acceptEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
acceptEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.acceptEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.acceptEitherAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.acceptEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterEither
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterEither
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterEither
action
- the action forCompletionStage.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 ofCompletionStage.runAfterEither
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterEither
action
- the action forCompletionStage.runAfterEither
- Returns:
- the new (unnamed) CompletionStage
-
runAfterEitherAsync
public NameableCompletionStage<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
Original version ofCompletionStage.runAfterEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterEitherAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterEitherAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
runAfterEitherAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
other
- the other CompletionStage forCompletionStage.runAfterEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.runAfterEitherAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackother
- the other CompletionStage forCompletionStage.runAfterEitherAsync
action
- the action forCompletionStage.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 ofCompletionStage.thenCompose
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenCompose
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the returned CompletionStage's result- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.thenCompose
.- Type Parameters:
U
- the type of the returned CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.thenComposeAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenComposeAsync
in interfacejava.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 ofCompletionStage.thenComposeAsync
.- Type Parameters:
U
- the type of the returned CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- 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 ofCompletionStage.thenComposeAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
thenComposeAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the type of the returned CompletionStage's result- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.thenComposeAsync
.- Type Parameters:
U
- the type of the returned CompletionStage's result- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.exceptionally
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
exceptionally
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.exceptionally
.- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.exceptionally
- Returns:
- the new (unnamed) CompletionStage
-
whenComplete
public NameableCompletionStage<T> whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
Original version ofCompletionStage.whenComplete
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
whenComplete
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.whenComplete
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.whenComplete
- Returns:
- the new (unnamed) CompletionStage
-
whenCompleteAsync
public NameableCompletionStage<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action)
Original version ofCompletionStage.whenCompleteAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
whenCompleteAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.whenCompleteAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.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 ofCompletionStage.whenCompleteAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
whenCompleteAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Parameters:
action
- the action forCompletionStage.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 ofCompletionStage.whenCompleteAsync
.- Parameters:
name
- the name for the new CompletionStage and completion callbackaction
- the action forCompletionStage.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 ofCompletionStage.handle
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
handle
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.handle
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.handleAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
handleAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.handleAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.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 ofCompletionStage.handleAsync
, but returns a NameableCompletionStage where subsequent method calls can use named variations.- Specified by:
handleAsync
in interfacejava.util.concurrent.CompletionStage<T>
- Type Parameters:
U
- the function's return type- Parameters:
fn
- the function forCompletionStage.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 ofCompletionStage.handleAsync
.- Type Parameters:
U
- the function's return type- Parameters:
name
- the name for the new CompletionStage and completion callbackfn
- the function forCompletionStage.handleAsync
executor
- the executor to use for asynchronous execution- Returns:
- the new (unnamed) CompletionStage
-
toCompletableFuture
public java.util.concurrent.CompletableFuture<T> toCompletableFuture()
Original version ofCompletionStage.toCompletableFuture
.- Specified by:
toCompletableFuture
in interfacejava.util.concurrent.CompletionStage<T>
- Returns:
- the CompletableFuture
-
toCompletableFutureNamed
public java.util.concurrent.CompletableFuture<T> toCompletableFutureNamed(java.lang.String name)
Named version ofCompletionStage.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 givenCompletionStage
.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
-
-