类 FutureAdapter<V>
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<V>
-
- org.apache.dubbo.rpc.protocol.dubbo.FutureAdapter<V>
-
- 所有已实现的接口:
CompletionStage<V>
,Future<V>
public class FutureAdapter<V> extends CompletableFuture<V>
This is the type of the Future instance users get in an async call: 1. unwrap AppResponse in appResponseFuture and convert to plain biz result represented by FutureAdapter. 2. customized behaviors meaningful for RPC, for example,cancel(boolean)
-
-
嵌套类概要
-
从类继承的嵌套类/接口 java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
构造器概要
构造器 构造器 说明 FutureAdapter(CompletableFuture<AppResponse> future)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
cancel(boolean mayInterruptIfRunning)
V
get()
V
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
从类继承的方法 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, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCompletedExceptionally, 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
-
-
-
-
构造器详细资料
-
FutureAdapter
public FutureAdapter(CompletableFuture<AppResponse> future)
-
-
方法详细资料
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- 指定者:
isCancelled
在接口中Future<V>
- 覆盖:
isCancelled
在类中CompletableFuture<V>
-
get
public V get() throws InterruptedException, ExecutionException
- 指定者:
get
在接口中Future<V>
- 覆盖:
get
在类中CompletableFuture<V>
- 抛出:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- 指定者:
get
在接口中Future<V>
- 覆盖:
get
在类中CompletableFuture<V>
- 抛出:
InterruptedException
ExecutionException
TimeoutException
-
-