dsmiley commented on code in PR #2834:
URL: https://github.com/apache/solr/pull/2834#discussion_r1827771870


##########
solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java:
##########
@@ -400,29 +402,14 @@ public Set<String> getHostAllowList() {
     return hostAllowList;
   }
 
-  /**
-   * Iterate over collections. Unlike {@link #getCollectionStates()} 
collections passed to the
-   * consumer are guaranteed to exist.
-   *
-   * @param consumer collection consumer.
-   */
+  /** Streams the resolved DocCollections. Use this sparingly in case there 
are many collections. */
+  public Stream<DocCollection> collectionStream() {
+    return 
collectionStates.values().stream().map(CollectionRef::get).filter(Objects::nonNull);
+  }
+
+  /** Streams the resolved DocCollections. Use this sparingly in case there 
are many collections. */

Review Comment:
   It was deliberate as I thought it was good enough, but I'll add more words



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to