sanpwc commented on code in PR #931:
URL: https://github.com/apache/ignite-3/pull/931#discussion_r916954359


##########
modules/metastorage-client/src/main/java/org/apache/ignite/internal/metastorage/client/CursorImpl.java:
##########
@@ -50,19 +52,41 @@
 
     private final Iterator<T> it;
 
-    private final Function<Object, T> fn;
+    /**
+     * Constructor.
+     *
+     * @param metaStorageRaftGrpSvc Meta storage raft group service.
+     * @param initOp                Future that runs meta storage service 
operation that provides cursor.
+     * @param fn                    Function transforming the element of type 
{@link M} to the type of {@link T}.
+     */
+    public <M> CursorImpl(
+            RaftGroupService metaStorageRaftGrpSvc,
+            CompletableFuture<IgniteUuid> initOp,
+            Function<M, T> fn
+    ) {
+        this.metaStorageRaftGrpSvc = metaStorageRaftGrpSvc;
+        this.initOp = initOp;
+        this.it = new InnerIterator(e -> singleton(e), fn);

Review Comment:
   Do you really like an idea of wrapping every next result with SingletonSet?



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