sashapolo commented on code in PR #5092:
URL: https://github.com/apache/ignite-3/pull/5092#discussion_r1961636832


##########
modules/core/src/main/java/org/apache/ignite/internal/util/io/IgniteDataInput.java:
##########
@@ -418,4 +421,61 @@ interface Materializer<T> {
          */
         T materialize(byte[] buffer, int offset, int length);
     }
+
+    /**
+     * Reads a collection.
+     *
+     * @param collectionSupplier Supplier to create a collection.
+     * @param elementReader Function to read an element.
+     * @return Collection.
+     */
+    default <T, C extends Collection<T>> C readCollection(
+            Supplier<C> collectionSupplier,

Review Comment:
   Why not replace it with an `IntFunction`? We would be able to utilize the 
collection size, which is known in advance.



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to