Class NodePageStream<R>


  • public class NodePageStream<R>
    extends Object
    This class provides an interface headPage() that returns a future will be completed with NodePage of cache query result from single node. A new page requests when previous page was fetched by class consumer.
    • Constructor Detail

    • Method Detail

      • nodeId

        public UUID nodeId()
      • headPage

        public CompletableFuture<NodePage<R>> headPage()
        Returns a last delivered page from this stream.
        Returns:
        Future that will be completed with query result page.
      • addPage

        public void addPage​(Collection<R> data,
                            boolean last)
        Add new query result page of data.
        Parameters:
        data - Collection of query result items.
        last - Whether it is the last page from this node.
      • cancel

        public void cancel​(Throwable err)
        Cancel query on all nodes.
      • hasRemotePages

        public boolean hasRemotePages()
        Returns:
        true if there are some undelivered page from the node, otherwise false.
      • closed

        public boolean closed()
        Returns:
        true if this stream delivers all query results from the node to a consumer.