timoninmaxim commented on a change in pull request #9081: URL: https://github.com/apache/ignite/pull/9081#discussion_r725852050
########## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/reducer/NodePageStream.java ########## @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.query.reducer; + +import java.util.Collection; +import java.util.Collections; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +/** + * This class provides an interface {@link #nextPage()} that returns a {@link NodePage} of cache query result from + * single node. A new page requests when previous page was fetched by class consumer. + */ +public class NodePageStream<R> { + /** Node ID to stream pages */ + private final UUID nodeId; + + /** Flags shows whether there are no available pages on a query node. */ + private boolean noRemotePages; + + /** Last delivered page from the stream. */ + private NodePage<R> head; Review comment: We need to have additional object to notify a `NodePageStream` to request next page. It could be a flag or function. IMHO, usage `head` is the most clearest approach. -- 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]
