类 DefaultFuture
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<Object>
-
- org.apache.dubbo.remoting.exchange.support.DefaultFuture
-
- 所有已实现的接口:
CompletionStage<Object>
,Future<Object>
public class DefaultFuture extends CompletableFuture<Object>
DefaultFuture.
-
-
嵌套类概要
-
从类继承的嵌套类/接口 java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
字段概要
字段 修饰符和类型 字段 说明 static Timer
TIME_OUT_TIMER
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
cancel()
boolean
cancel(boolean mayInterruptIfRunning)
static void
closeChannel(Channel channel)
close a channel when a channel is inactive directly return the unfinished requests.ExecutorService
getExecutor()
static DefaultFuture
getFuture(long id)
Request
getRequest()
static boolean
hasFuture(Channel channel)
static DefaultFuture
newFuture(Channel channel, Request request, int timeout, ExecutorService executor)
init a DefaultFuture 1.init a DefaultFuture 2.timeout checkstatic void
received(Channel channel, Response response)
static void
received(Channel channel, Response response, boolean timeout)
static void
sent(Channel channel, Request request)
void
setExecutor(ExecutorService executor)
-
从类继承的方法 java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, 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, whenCompleteAsync
-
-
-
-
字段详细资料
-
TIME_OUT_TIMER
public static final Timer TIME_OUT_TIMER
-
-
方法详细资料
-
getExecutor
public ExecutorService getExecutor()
-
setExecutor
public void setExecutor(ExecutorService executor)
-
newFuture
public static DefaultFuture newFuture(Channel channel, Request request, int timeout, ExecutorService executor)
init a DefaultFuture 1.init a DefaultFuture 2.timeout check- 参数:
channel
- channelrequest
- the requesttimeout
- timeout- 返回:
- a new DefaultFuture
-
getFuture
public static DefaultFuture getFuture(long id)
-
hasFuture
public static boolean hasFuture(Channel channel)
-
closeChannel
public static void closeChannel(Channel channel)
close a channel when a channel is inactive directly return the unfinished requests.- 参数:
channel
- channel to close
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
cancel
public void cancel()
-
getRequest
public Request getRequest()
-
-