public class EventLoopCheckingFuture<T> extends CompletableFuture<T>
CompletableFuture that warns the user if they call a method that blocks the event loop.CompletableFuture.AsynchronousCompletionTask| Constructor and Description |
|---|
EventLoopCheckingFuture() |
| Modifier and Type | Method and Description |
|---|---|
static <U> EventLoopCheckingFuture<U> |
completedFuture(U value)
Returns an
EventLoopCheckingFuture which has been completed with the specified value. |
static <U> EventLoopCheckingFuture<U> |
exceptionallyCompletedFuture(Throwable cause)
Returns an
EventLoopCheckingFuture which has been completed exceptionally with the specified
Throwable. |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
T |
join() |
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeExceptionally, exceptionally, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsyncpublic static <U> EventLoopCheckingFuture<U> completedFuture(U value)
EventLoopCheckingFuture which has been completed with the specified value.public static <U> EventLoopCheckingFuture<U> exceptionallyCompletedFuture(Throwable cause)
EventLoopCheckingFuture which has been completed exceptionally with the specified
Throwable.public T get() throws InterruptedException, ExecutionException
get in interface Future<T>get in class CompletableFuture<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>get in class CompletableFuture<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic T join()
join in class CompletableFuture<T>Copyright © 2020 LeanCloud. All rights reserved.