This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch 3.x-dev
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/3.x-dev by this push:
new ebe3e42 add comment
ebe3e42 is described below
commit ebe3e424579d5986bf4cbb518ca6a4ff28f9a257
Author: ken.lj <[email protected]>
AuthorDate: Fri Apr 26 14:58:34 2019 +0800
add comment
---
.../dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java
index 7ad22c6..1f3a513 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java
@@ -126,6 +126,15 @@ public interface Result extends CompletionStage<Result>,
Future<Result>, Seriali
*/
Result getNow(Result valueIfAbsent);
+ /**
+ * Add a callback which can be triggered when the RPC call finishes.
+ * <p>
+ * 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 {@link
AsyncRpcResult#thenApplyWithContext(Function)}
+ *
+ * @param fn
+ * @return
+ */
Result thenApplyWithContext(Function<Result, Result> fn);
default CompletableFuture<Result> completionFuture() {