aashish-confluent commented on code in PR #24169:
URL: https://github.com/apache/kafka/pull/24169#discussion_r4596283427


##########
server/src/main/java/org/apache/kafka/server/share/session/ShareSessionCache.java:
##########
@@ -227,6 +227,17 @@ public synchronized void 
registerShareGroupListener(ShareGroupListener shareGrou
         this.shareGroupListener = shareGroupListener;
     }
 
+    /**
+     * Get the key of the share session that the client connection was last 
used for.
+     *
+     * @param connectionId The client connection id.
+     * @return The share session key, or null if the connection has not been 
used for a share session.
+     */
+    public synchronized ShareSessionKey connectionShareSessionKey(String 
connectionId) {
+        SessionKeyAndState sessionKeyAndState = 
connectionIdToSessionMap.get(connectionId);
+        return sessionKeyAndState == null ? null : 
sessionKeyAndState.shareSessionKey();

Review Comment:
   Addressed, Thanks.



-- 
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