CompletionStage
instead. When migrating to CompletionStage, Promise implements
CompletionStage, so it may be easier to first migrate all the existing method calls on the promise,
such as map/flatMap, which are also deprecated but include migration instructions in the deprecation
message.@Deprecated
public static class F.Promise<A>
extends java.lang.Object
implements java.util.concurrent.CompletionStage<A>
A
.Modifier and Type | Method and Description |
---|---|
F.Promise<java.lang.Void> |
acceptEither(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Consumer<? super A> action)
Deprecated.
|
F.Promise<java.lang.Void> |
acceptEitherAsync(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Consumer<? super A> action)
Deprecated.
|
F.Promise<java.lang.Void> |
acceptEitherAsync(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Consumer<? super A> action,
java.util.concurrent.Executor executor)
Deprecated.
|
<U> F.Promise<U> |
applyToEither(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Function<? super A,U> fn)
Deprecated.
|
<U> F.Promise<U> |
applyToEitherAsync(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Function<? super A,U> fn)
Deprecated.
|
<U> F.Promise<U> |
applyToEitherAsync(java.util.concurrent.CompletionStage<? extends A> other,
java.util.function.Function<? super A,U> fn,
java.util.concurrent.Executor executor)
Deprecated.
|
scala.concurrent.Future<A> |
asScala()
Deprecated.
Convert this promise to a Scala future.
|
static <A> F.Promise<A> |
delayed(java.util.function.Supplier<A> function,
long delay,
java.util.concurrent.TimeUnit unit)
Deprecated.
|
static <A> F.Promise<A> |
delayed(java.util.function.Supplier<A> function,
long delay,
java.util.concurrent.TimeUnit unit,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
Futures.delayed(Supplier, long, TimeUnit, Executor) instead. |
F.Promise<A> |
exceptionally(java.util.function.Function<java.lang.Throwable,? extends A> fn)
Deprecated.
|
F.Promise<A> |
fallbackTo(F.Promise<A> fallback)
Deprecated.
Use
handleAsync(BiFunction) followed by thenCompose(Function)
with the identity function. |
F.Promise<A> |
filter(java.util.function.Predicate<? super A> predicate)
Deprecated.
Use
thenApplyAsync(Function, Executor) to implement the filter manually. |
F.Promise<A> |
filter(java.util.function.Predicate<? super A> predicate,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
thenApplyAsync(Function, Executor) to implement the filter manually. |
<B> F.Promise<B> |
flatMap(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<B>> function)
Deprecated.
Use
thenComposeAsync(Function, Executor) with HttpExecution.defaultContext() if
you want to capture the current context. |
<B> F.Promise<B> |
flatMap(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<B>> function,
scala.concurrent.ExecutionContext ec)
Deprecated.
|
A |
get(long timeout)
Deprecated.
Calling get on a promise is a blocking operation and so introduces the risk of deadlocks
and has serious performance implications.
|
A |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Deprecated.
Calling get on a promise is a blocking operation and so introduces the risk of deadlocks
and has serious performance implications.
|
<U> F.Promise<U> |
handle(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn)
Deprecated.
|
<U> F.Promise<U> |
handleAsync(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn)
Deprecated.
|
<U> F.Promise<U> |
handleAsync(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn,
java.util.concurrent.Executor executor)
Deprecated.
|
<B> F.Promise<B> |
map(java.util.function.Function<? super A,? extends B> function)
Deprecated.
Use
thenApplyAsync(Function, Executor) with HttpExecution.defaultContext() if
you want to capture the current context. |
<B> F.Promise<B> |
map(java.util.function.Function<? super A,? extends B> function,
scala.concurrent.ExecutionContext ec)
Deprecated.
|
void |
onFailure(java.util.function.Consumer<java.lang.Throwable> action)
Deprecated.
Use
whenCompleteAsync(BiConsumer, Executor) with HttpExecution.defaultContext() if
you want to capture the current context. |
void |
onFailure(java.util.function.Consumer<java.lang.Throwable> action,
scala.concurrent.ExecutionContext ec)
Deprecated.
|
void |
onRedeem(java.util.function.Consumer<? super A> action)
Deprecated.
Use
thenAcceptAsync(Consumer, Executor) with HttpExecution.defaultContext() instead. |
void |
onRedeem(java.util.function.Consumer<? super A> action,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
thenAcceptAsync(Consumer, Executor) instead. |
<B> F.Promise<F.Either<A,B>> |
or(F.Promise<B> another)
Deprecated.
Use
applyToEither(CompletionStage, Function) instead. |
static <A> F.Promise<A> |
promise(java.util.function.Supplier<A> function)
Deprecated.
Use
CompletableFuture.supplyAsync(Supplier, Executor) instead. |
static <A> F.Promise<A> |
promise(java.util.function.Supplier<A> function,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
CompletableFuture.supplyAsync(Supplier, Executor) instead. |
static <A> F.Promise<A> |
pure(A a)
Deprecated.
Use
CompletableFuture.completedFuture(Object) instead. |
F.Promise<A> |
recover(java.util.function.Function<java.lang.Throwable,? extends A> function)
Deprecated.
Use
exceptionally(Function) if you don't need the current context captured,
or handleAsync(BiFunction, Executor) with HttpExecution.defaultContext() if
you do. |
F.Promise<A> |
recover(java.util.function.Function<java.lang.Throwable,? extends A> function,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
handleAsync(BiFunction, Executor) instead. |
F.Promise<A> |
recoverWith(java.util.function.Function<java.lang.Throwable,? extends java.util.concurrent.CompletionStage<A>> function)
Deprecated.
Use
exceptionally(Function) if you don't need the current context captured,
or handleAsync(BiFunction, Executor) with HttpExecution.defaultContext() if
you do, then use thenCompose(Function) with the identity function to flatten the result. |
F.Promise<A> |
recoverWith(java.util.function.Function<java.lang.Throwable,F.Promise<A>> function,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
handleAsync(BiFunction, Executor) instead, followed by thenCompose(Function)
with the identity function. |
F.Promise<java.lang.Void> |
runAfterBoth(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
runAfterBothAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
runAfterBothAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action,
java.util.concurrent.Executor executor)
Deprecated.
|
F.Promise<java.lang.Void> |
runAfterEither(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other,
java.lang.Runnable action,
java.util.concurrent.Executor executor)
Deprecated.
|
static <A> F.Promise<java.util.List<A>> |
sequence(scala.concurrent.ExecutionContext ec,
F.Promise<A>... promises)
Deprecated.
Use
Futures.sequence(CompletionStage[]) instead. |
static <A> F.Promise<java.util.List<A>> |
sequence(F.Promise<A>... promises)
Deprecated.
Use
Futures.sequence(CompletionStage[]) instead. |
static <A> F.Promise<java.util.List<A>> |
sequence(java.lang.Iterable<F.Promise<A>> promises)
Deprecated.
Use
Futures.sequence(Iterable) instead. |
static <A> F.Promise<java.util.List<A>> |
sequence(java.lang.Iterable<F.Promise<A>> promises,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
Futures.sequence(Iterable) instead. |
F.Promise<java.lang.Void> |
thenAccept(java.util.function.Consumer<? super A> action)
Deprecated.
|
F.Promise<java.lang.Void> |
thenAcceptAsync(java.util.function.Consumer<? super A> action)
Deprecated.
|
F.Promise<java.lang.Void> |
thenAcceptAsync(java.util.function.Consumer<? super A> action,
java.util.concurrent.Executor executor)
Deprecated.
|
<U> F.Promise<java.lang.Void> |
thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super A,? super U> action)
Deprecated.
|
<U> F.Promise<java.lang.Void> |
thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super A,? super U> action)
Deprecated.
|
<U> F.Promise<java.lang.Void> |
thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiConsumer<? super A,? super U> action,
java.util.concurrent.Executor executor)
Deprecated.
|
<U> F.Promise<U> |
thenApply(java.util.function.Function<? super A,? extends U> fn)
Deprecated.
|
<U> F.Promise<U> |
thenApplyAsync(java.util.function.Function<? super A,? extends U> fn)
Deprecated.
|
<U> F.Promise<U> |
thenApplyAsync(java.util.function.Function<? super A,? extends U> fn,
java.util.concurrent.Executor executor)
Deprecated.
|
<U,V> F.Promise<V> |
thenCombine(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super A,? super U,? extends V> fn)
Deprecated.
|
<U,V> F.Promise<V> |
thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super A,? super U,? extends V> fn)
Deprecated.
|
<U,V> F.Promise<V> |
thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other,
java.util.function.BiFunction<? super A,? super U,? extends V> fn,
java.util.concurrent.Executor executor)
Deprecated.
|
<U> F.Promise<U> |
thenCompose(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn)
Deprecated.
|
<U> F.Promise<U> |
thenComposeAsync(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn)
Deprecated.
|
<U> F.Promise<U> |
thenComposeAsync(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn,
java.util.concurrent.Executor executor)
Deprecated.
|
F.Promise<java.lang.Void> |
thenRun(java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
thenRunAsync(java.lang.Runnable action)
Deprecated.
|
F.Promise<java.lang.Void> |
thenRunAsync(java.lang.Runnable action,
java.util.concurrent.Executor executor)
Deprecated.
|
static <A> F.Promise<A> |
throwing(java.lang.Throwable throwable)
Deprecated.
Construct a new
CompletableFuture and use
CompletableFuture.completeExceptionally(Throwable) instead. |
static <A> F.Promise<A> |
timeout(A message,
long delay)
Deprecated.
Use
Futures.timeout(Object, long, TimeUnit) instead. |
static <A> F.Promise<A> |
timeout(A message,
long delay,
java.util.concurrent.TimeUnit unit)
Deprecated.
Use
Futures.timeout(Object, long, TimeUnit) instead. |
static F.Promise<java.lang.Void> |
timeout(long delay)
Deprecated.
Use
Futures.timeout(long, TimeUnit) instead. |
static F.Promise<java.lang.Void> |
timeout(long delay,
java.util.concurrent.TimeUnit unit)
Deprecated.
Use
Futures.timeout(long, TimeUnit) instead. |
java.util.concurrent.CompletableFuture<A> |
toCompletableFuture()
Deprecated.
|
<B> F.Promise<B> |
transform(java.util.function.Function<? super A,? extends B> onSuccess,
java.util.function.Function<java.lang.Throwable,java.lang.Throwable> onFailure)
Deprecated.
Use
handleAsync(BiFunction, Executor) instead. |
<B> F.Promise<B> |
transform(java.util.function.Function<? super A,? extends B> onSuccess,
java.util.function.Function<java.lang.Throwable,java.lang.Throwable> onFailure,
scala.concurrent.ExecutionContext ec)
Deprecated.
Use
handleAsync(BiFunction, Executor) instead. |
F.Promise<A> |
whenComplete(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action)
Deprecated.
|
F.Promise<A> |
whenCompleteAsync(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action)
Deprecated.
|
F.Promise<A> |
whenCompleteAsync(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action,
java.util.concurrent.Executor executor)
Deprecated.
|
static <A> F.Promise<A> |
wrap(java.util.concurrent.CompletionStage<A> future)
Deprecated.
|
static <A> F.Promise<A> |
wrap(scala.concurrent.Future<A> future)
Deprecated.
Use
FutureConverters.toJava(Future) instead. |
scala.concurrent.Future<A> |
wrapped()
Deprecated.
Promise no longer wraps a Scala Future, use asScala instead.
|
<B> F.Promise<F.Tuple<A,B>> |
zip(java.util.concurrent.CompletionStage<B> another)
Deprecated.
Use
thenCombine(CompletionStage, BiFunction) instead. |
public static <A> F.Promise<A> wrap(java.util.concurrent.CompletionStage<A> future)
@Deprecated public static <A> F.Promise<A> wrap(scala.concurrent.Future<A> future)
FutureConverters.toJava(Future)
instead.future
- The Scala Future to wrap@Deprecated public static <A> F.Promise<java.util.List<A>> sequence(F.Promise<A>... promises)
Futures.sequence(CompletionStage[])
instead.promises
- The promises to combine@Deprecated public static <A> F.Promise<java.util.List<A>> sequence(scala.concurrent.ExecutionContext ec, F.Promise<A>... promises)
Futures.sequence(CompletionStage[])
instead.ec
- Used to execute the sequencing operations.promises
- The promises to combine@Deprecated public static <A> F.Promise<A> timeout(A message, long delay, java.util.concurrent.TimeUnit unit)
Futures.timeout(Object, long, TimeUnit)
instead.message
- The message to use to redeem the Promise.delay
- The delay (expressed with the corresponding unit).unit
- The Unit.@Deprecated public static <A> F.Promise<A> timeout(A message, long delay)
Futures.timeout(Object, long, TimeUnit)
instead.message
- The message to use to redeem the Promise.delay
- The delay expressed in milliseconds.@Deprecated public static F.Promise<java.lang.Void> timeout(long delay)
Futures.timeout(long, TimeUnit)
instead.delay
- The delay expressed in milliseconds.@Deprecated public static F.Promise<java.lang.Void> timeout(long delay, java.util.concurrent.TimeUnit unit)
Futures.timeout(long, TimeUnit)
instead.delay
- The delay (expressed with the corresponding unit).unit
- The Unit.@Deprecated public static <A> F.Promise<java.util.List<A>> sequence(java.lang.Iterable<F.Promise<A>> promises)
Futures.sequence(Iterable)
instead.promises
- The promises to combine@Deprecated public static <A> F.Promise<java.util.List<A>> sequence(java.lang.Iterable<F.Promise<A>> promises, scala.concurrent.ExecutionContext ec)
Futures.sequence(Iterable)
instead.promises
- The promises to combineec
- Used to execute the sequencing operations.@Deprecated public static <A> F.Promise<A> pure(A a)
CompletableFuture.completedFuture(Object)
instead.a
- the value for the promise@Deprecated public static <A> F.Promise<A> throwing(java.lang.Throwable throwable)
CompletableFuture
and use
CompletableFuture.completeExceptionally(Throwable)
instead.throwable
- Value to throw@Deprecated public static <A> F.Promise<A> promise(java.util.function.Supplier<A> function)
CompletableFuture.supplyAsync(Supplier, Executor)
instead.function
- Used to fulfill the Promise.@Deprecated public static <A> F.Promise<A> promise(java.util.function.Supplier<A> function, scala.concurrent.ExecutionContext ec)
CompletableFuture.supplyAsync(Supplier, Executor)
instead.function
- Used to fulfill the Promise.ec
- The ExecutionContext to run the function in.@Deprecated public static <A> F.Promise<A> delayed(java.util.function.Supplier<A> function, long delay, java.util.concurrent.TimeUnit unit)
Futures.delayed(Supplier, long, TimeUnit, Executor)
with
HttpExecution.defaultContext()
instead.function
- The function to call to fulfill the Promise.delay
- The time to wait.unit
- The units to use for the delay.@Deprecated public static <A> F.Promise<A> delayed(java.util.function.Supplier<A> function, long delay, java.util.concurrent.TimeUnit unit, scala.concurrent.ExecutionContext ec)
Futures.delayed(Supplier, long, TimeUnit, Executor)
instead.function
- The function to call to fulfill the Promise.delay
- The time to wait.unit
- The units to use for the delay.@Deprecated public A get(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- A user defined timeoutunit
- timeout for timeoutF.PromiseTimeoutException
- when the promise did timeout.@Deprecated public A get(long timeout)
timeout
- A user defined timeout in millisecondsF.PromiseTimeoutException
- when the promise did timeout.@Deprecated public <B> F.Promise<F.Either<A,B>> or(F.Promise<B> another)
applyToEither(CompletionStage, Function)
instead.another
promise using `or`.another
- promise that will be combined@Deprecated public void onRedeem(java.util.function.Consumer<? super A> action)
thenAcceptAsync(Consumer, Executor)
with HttpExecution.defaultContext()
instead.action
callback when the Promise is redeemed.
The callback will be run in the default execution context.action
- The action to perform.@Deprecated public void onRedeem(java.util.function.Consumer<? super A> action, scala.concurrent.ExecutionContext ec)
thenAcceptAsync(Consumer, Executor)
instead.action
callback when the Promise is redeemed.action
- The action to perform.ec
- The ExecutionContext to execute the action in.@Deprecated public <B> F.Promise<B> map(java.util.function.Function<? super A,? extends B> function)
thenApplyAsync(Function, Executor)
with HttpExecution.defaultContext()
if
you want to capture the current context.B
. The function function
is applied as
soon as the promise is redeemed.
The function will be run in the default execution context.function
- The function to map A
to B
.A
to B
.@Deprecated public <B> F.Promise<B> map(java.util.function.Function<? super A,? extends B> function, scala.concurrent.ExecutionContext ec)
thenApplyAsync(Function, Executor)
B
. The function function
is applied as
soon as the promise is redeemed.function
- The function to map A
to B
.ec
- The ExecutionContext to execute the function in.A
to B
.@Deprecated public F.Promise<A> recover(java.util.function.Function<java.lang.Throwable,? extends A> function)
exceptionally(Function)
if you don't need the current context captured,
or handleAsync(BiFunction, Executor)
with HttpExecution.defaultContext()
if
you do.function
- The function to handle the exception. This may, for example, convert the exception into something
of type T
, or it may throw another exception, or it may do some other handling.function
throws an
exception.@Deprecated public F.Promise<A> recover(java.util.function.Function<java.lang.Throwable,? extends A> function, scala.concurrent.ExecutionContext ec)
handleAsync(BiFunction, Executor)
instead.function
- The function to handle the exception. This may, for example, convert the exception into something
of type T
, or it may throw another exception, or it may do some other handling.ec
- The ExecutionContext to execute the function in.function
throws an
exception.@Deprecated public F.Promise<A> recoverWith(java.util.function.Function<java.lang.Throwable,? extends java.util.concurrent.CompletionStage<A>> function)
exceptionally(Function)
if you don't need the current context captured,
or handleAsync(BiFunction, Executor)
with HttpExecution.defaultContext()
if
you do, then use thenCompose(Function)
with the identity function to flatten the result.function
- The function to handle the exception, and which returns another promise@Deprecated public F.Promise<A> recoverWith(java.util.function.Function<java.lang.Throwable,F.Promise<A>> function, scala.concurrent.ExecutionContext ec)
handleAsync(BiFunction, Executor)
instead, followed by thenCompose(Function)
with the identity function.function
- The function to handle the exception, and which returns another promiseec
- The ExecutionContext to execute the function in@Deprecated public F.Promise<A> fallbackTo(F.Promise<A> fallback)
handleAsync(BiFunction)
followed by thenCompose(Function)
with the identity function.fallback
promise if it completed successfully.
If both promises failed, the resulting promise holds the throwable of this promise.fallback
- The promise to fallback to if this promise has failed@Deprecated public void onFailure(java.util.function.Consumer<java.lang.Throwable> action)
whenCompleteAsync(BiConsumer, Executor)
with HttpExecution.defaultContext()
if
you want to capture the current context.action
callback if the promise encounters an exception.
This action will be run in the default exceution context.action
- The action to perform.@Deprecated public void onFailure(java.util.function.Consumer<java.lang.Throwable> action, scala.concurrent.ExecutionContext ec)
whenCompleteAsync(BiConsumer, Executor)
.action
callback if the promise encounters an exception.action
- The action to perform.ec
- The ExecutionContext to execute the callback in.@Deprecated public <B> F.Promise<B> flatMap(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<B>> function)
thenComposeAsync(Function, Executor)
with HttpExecution.defaultContext()
if
you want to capture the current context.B
, and flattens that to be
a single promise for B
.
The function will be run in the default execution context.function
- The function to map A
to a promise for B
.B
@Deprecated public <B> F.Promise<B> flatMap(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<B>> function, scala.concurrent.ExecutionContext ec)
thenComposeAsync(Function, Executor)
.B
, and flattens that to be
a single promise for B
.function
- The function to map A
to a promise for B
.ec
- The ExecutionContext to execute the function in.B
@Deprecated public F.Promise<A> filter(java.util.function.Predicate<? super A> predicate)
thenApplyAsync(Function, Executor)
to implement the filter manually.predicate
- The predicate to test the current value.@Deprecated public F.Promise<A> filter(java.util.function.Predicate<? super A> predicate, scala.concurrent.ExecutionContext ec)
thenApplyAsync(Function, Executor)
to implement the filter manually.predicate
- The predicate to test the current value.ec
- The ExecutionContext to execute the filtering in.@Deprecated public <B> F.Promise<B> transform(java.util.function.Function<? super A,? extends B> onSuccess, java.util.function.Function<java.lang.Throwable,java.lang.Throwable> onFailure)
handleAsync(BiFunction, Executor)
instead.onSuccess
function to a successful result,
or the onFailure
function to a failed result.
The function will be run in the default execution context.onSuccess
- The function to map a successful result from A
to B
onFailure
- The function to map the Throwable
when failedonSuccess
or onFailure
functions@Deprecated public <B> F.Promise<B> transform(java.util.function.Function<? super A,? extends B> onSuccess, java.util.function.Function<java.lang.Throwable,java.lang.Throwable> onFailure, scala.concurrent.ExecutionContext ec)
handleAsync(BiFunction, Executor)
instead.onSuccess
function to a successful result,
or the onFailure
function to a failed result.onSuccess
- The function to map a successful result from A
to B
onFailure
- The function to map the Throwable
when failedec
- The ExecutionContext to execute functions inonSuccess
or onFailure
functions@Deprecated public <B> F.Promise<F.Tuple<A,B>> zip(java.util.concurrent.CompletionStage<B> another)
thenCombine(CompletionStage, BiFunction)
instead.another
, and creates a new promise holding the tuple of their resultsanother
- @Deprecated public scala.concurrent.Future<A> wrapped()
public scala.concurrent.Future<A> asScala()
public <U> F.Promise<U> thenApply(java.util.function.Function<? super A,? extends U> fn)
thenApply
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> thenApplyAsync(java.util.function.Function<? super A,? extends U> fn)
thenApplyAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> thenApplyAsync(java.util.function.Function<? super A,? extends U> fn, java.util.concurrent.Executor executor)
thenApplyAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenAccept(java.util.function.Consumer<? super A> action)
thenAccept
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super A> action)
thenAcceptAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super A> action, java.util.concurrent.Executor executor)
thenAcceptAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenRun(java.lang.Runnable action)
thenRun
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenRunAsync(java.lang.Runnable action)
thenRunAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> thenRunAsync(java.lang.Runnable action, java.util.concurrent.Executor executor)
thenRunAsync
in interface java.util.concurrent.CompletionStage<A>
public <U,V> F.Promise<V> thenCombine(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super A,? super U,? extends V> fn)
thenCombine
in interface java.util.concurrent.CompletionStage<A>
public <U,V> F.Promise<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super A,? super U,? extends V> fn)
thenCombineAsync
in interface java.util.concurrent.CompletionStage<A>
public <U,V> F.Promise<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiFunction<? super A,? super U,? extends V> fn, java.util.concurrent.Executor executor)
thenCombineAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super A,? super U> action)
thenAcceptBoth
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super A,? super U> action)
thenAcceptBothAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U> other, java.util.function.BiConsumer<? super A,? super U> action, java.util.concurrent.Executor executor)
thenAcceptBothAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterBoth
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterBothAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
runAfterBothAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> applyToEither(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Function<? super A,U> fn)
applyToEither
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Function<? super A,U> fn)
applyToEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Function<? super A,U> fn, java.util.concurrent.Executor executor)
applyToEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Consumer<? super A> action)
acceptEither
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Consumer<? super A> action)
acceptEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends A> other, java.util.function.Consumer<? super A> action, java.util.concurrent.Executor executor)
acceptEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterEither
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action)
runAfterEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?> other, java.lang.Runnable action, java.util.concurrent.Executor executor)
runAfterEitherAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> thenCompose(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn)
thenCompose
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> thenComposeAsync(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn)
thenComposeAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> thenComposeAsync(java.util.function.Function<? super A,? extends java.util.concurrent.CompletionStage<U>> fn, java.util.concurrent.Executor executor)
thenComposeAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<A> exceptionally(java.util.function.Function<java.lang.Throwable,? extends A> fn)
exceptionally
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<A> whenComplete(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action)
whenComplete
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<A> whenCompleteAsync(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action)
whenCompleteAsync
in interface java.util.concurrent.CompletionStage<A>
public F.Promise<A> whenCompleteAsync(java.util.function.BiConsumer<? super A,? super java.lang.Throwable> action, java.util.concurrent.Executor executor)
whenCompleteAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> handle(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn)
handle
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> handleAsync(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn)
handleAsync
in interface java.util.concurrent.CompletionStage<A>
public <U> F.Promise<U> handleAsync(java.util.function.BiFunction<? super A,java.lang.Throwable,? extends U> fn, java.util.concurrent.Executor executor)
handleAsync
in interface java.util.concurrent.CompletionStage<A>