public abstract static class Result.AbstractResult extends Object implements Result
Result.AbstractResult, Result.CompatibleResult| 构造器和说明 |
|---|
AbstractResult() |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
get() |
Result |
get(long timeout,
TimeUnit unit) |
void |
setValue(Object value) |
<U> CompletableFuture<U> |
thenApply(Function<Result,? extends U> fn) |
Result |
whenCompleteWithContext(BiConsumer<Result,Throwable> fn)
Add a callback which can be triggered when the RPC call finishes.
|
addObjectAttachments, getObjectAttachment, getObjectAttachment, getObjectAttachments, setException, setObjectAttachmentsaddAttachments, getAttachment, getAttachment, getAttachments, getException, getValue, hasException, recreate, setAttachment, setAttachment, setAttachments, setObjectAttachmentpublic Result whenCompleteWithContext(BiConsumer<Result,Throwable> fn)
Result
Just as the method name implies, this method will guarantee the callback being triggered under the same context as when the call was started,
see implementation in Result.whenCompleteWithContext(BiConsumer)
whenCompleteWithContext 在接口中 Resultpublic <U> CompletableFuture<U> thenApply(Function<Result,? extends U> fn)
public Result get() throws InterruptedException, ExecutionException
get 在接口中 ResultInterruptedExceptionExecutionExceptionpublic Result get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get 在接口中 ResultInterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.