dajac commented on a change in pull request #8999:
URL: https://github.com/apache/kafka/pull/8999#discussion_r452400759



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/ClusterConnectionStates.java
##########
@@ -443,13 +444,13 @@ public boolean isConnectionSetupTimeout(String id, long 
now) {
     }
 
     /**
-     * Return the Set of nodes whose connection setup has timed out.
+     * Return the List of nodes whose connection setup has timed out.
      * @param now the current time in ms
      */
-    public Set<String> nodesWithConnectionSetupTimeout(long now) {
+    public List<String> nodesWithConnectionSetupTimeout(long now) {
         return connectingNodes.stream()
             .filter(id -> isConnectionSetupTimeout(id, now))
-            .collect(Collectors.toSet());
+            .collect(Collectors.toCollection(LinkedList::new));

Review comment:
       That’s good to know. I always thought that the iteration was more or 
less equivalent. I have learnt something today. Let me update that.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to