public class DeadlineFuture extends CompletableFuture<AppResponse>
CompletableFuture.AsynchronousCompletionTask| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTimeoutListener(Runnable runnable) |
void |
cancel() |
boolean |
cancel(boolean mayInterruptIfRunning) |
static void |
destroy() |
ExecutorService |
getExecutor() |
List<Runnable> |
getTimeoutListeners() |
static DeadlineFuture |
newFuture(String serviceName,
String methodName,
String address,
int timeout,
ExecutorService executor)
init a DeadlineFuture 1.init a DeadlineFuture 2.timeout check
|
void |
received(TriRpcStatus status,
AppResponse appResponse) |
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 void destroy()
public static DeadlineFuture newFuture(String serviceName, String methodName, String address, int timeout, ExecutorService executor)
timeout - timeout in Millspublic void received(TriRpcStatus status, AppResponse appResponse)
public void addTimeoutListener(Runnable runnable)
public ExecutorService getExecutor()
public void setExecutor(ExecutorService executor)
public boolean cancel(boolean mayInterruptIfRunning)
cancel 在接口中 Future<AppResponse>cancel 在类中 CompletableFuture<AppResponse>public void cancel()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.