szetszwo commented on code in PR #1357:
URL: https://github.com/apache/ratis/pull/1357#discussion_r2842691875


##########
ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientReplies.java:
##########
@@ -45,6 +45,10 @@ ReplyMap getReplyMap(ClientInvocationId clientInvocationId) {
     return replies.computeIfAbsent(clientInvocationId, key -> q.get());
   }
 
+  ReplyMap getReplyMapIfPresent(ClientInvocationId clientInvocationId) {

Review Comment:
   To avoid confusion, let's rename the original method to 
`getOrCreateReplyMap` and use `getReplyMap` for the new method.
   ```diff 
   -  ReplyMap getReplyMap(ClientInvocationId clientInvocationId) {
   +  ReplyMap getOrCreateReplyMap(ClientInvocationId clientInvocationId) {
        final MemoizedSupplier<ReplyMap> q = MemoizedSupplier.valueOf(() -> new 
ReplyMap(clientInvocationId));
        return replies.computeIfAbsent(clientInvocationId, key -> q.get());
      }
    
   +  ReplyMap getReplyMap(ClientInvocationId clientInvocationId) {
   +    return replies.get(clientInvocationId);
   +  }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to