public class DefaultFuture2 extends CompletableFuture<Object>
CompletableFuture.AsynchronousCompletionTask| 限定符和类型 | 字段和说明 |
|---|---|
static Timer |
TIME_OUT_TIMER |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel() |
boolean |
cancel(boolean mayInterruptIfRunning) |
ExecutorService |
getExecutor() |
static DefaultFuture2 |
getFuture(long id) |
static DefaultFuture2 |
newFuture(Connection connection,
Request request,
int timeout,
ExecutorService executor)
init a DefaultFuture
1.init a DefaultFuture
2.timeout check
|
static void |
received(Connection connection,
Response response) |
static void |
received(Connection connection,
Response response,
boolean timeout) |
static void |
sent(Request request) |
void |
setExecutor(ExecutorService executor) |
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, 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 final Timer TIME_OUT_TIMER
public static DefaultFuture2 newFuture(Connection connection, Request request, int timeout, ExecutorService executor)
connection - connectionrequest - the requesttimeout - timeoutpublic static DefaultFuture2 getFuture(long id)
public static void sent(Request request)
public static void received(Connection connection, Response response)
public static void received(Connection connection, Response response, boolean timeout)
public ExecutorService getExecutor()
public void setExecutor(ExecutorService executor)
public boolean cancel(boolean mayInterruptIfRunning)
public void cancel()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.