public final class CompletableFutures
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CompletableFutures.FutureCancelChecker |
Modifier and Type | Method and Description |
---|---|
static <R> java.util.concurrent.CompletableFuture<R> |
computeAsync(java.util.concurrent.Executor executor,
java.util.function.Function<CancelChecker,R> code)
A utility method to create a
CompletableFuture with cancellation support. |
static <R> java.util.concurrent.CompletableFuture<R> |
computeAsync(java.util.function.Function<CancelChecker,R> code)
A utility method to create a
CompletableFuture with cancellation support. |
public static <R> java.util.concurrent.CompletableFuture<R> computeAsync(java.util.function.Function<CancelChecker,R> code)
CompletableFuture
with cancellation support.code
- a function that accepts a CancelChecker
and returns the to be computed valuepublic static <R> java.util.concurrent.CompletableFuture<R> computeAsync(java.util.concurrent.Executor executor, java.util.function.Function<CancelChecker,R> code)
CompletableFuture
with cancellation support.code
- a function that accepts a CancelChecker
and returns the to be computed value