Skip to content

Commit ebe3e42

Browse files
committed
add comment
1 parent 0eb94fe commit ebe3e42

File tree

1 file changed

+9
-0
lines changed
  • dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc

1 file changed

+9
-0
lines changed

dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/Result.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ public interface Result extends CompletionStage<Result>, Future<Result>, Seriali
126126
*/
127127
Result getNow(Result valueIfAbsent);
128128

129+
/**
130+
* Add a callback which can be triggered when the RPC call finishes.
131+
* <p>
132+
* Just as the method name implies, this method will guarantee the callback being triggered under the same context as when the call was started,
133+
* see implementation in {@link AsyncRpcResult#thenApplyWithContext(Function)}
134+
*
135+
* @param fn
136+
* @return
137+
*/
129138
Result thenApplyWithContext(Function<Result, Result> fn);
130139

131140
default CompletableFuture<Result> completionFuture() {

0 commit comments

Comments
 (0)