public class AggregationQueryPager.GroupByPartitionIterator extends java.lang.Object implements PartitionIterator
PartitionIterator
that automatically fetch a new sub-page of data if needed when the current iterator is
exhausted.Constructor and Description |
---|
GroupByPartitionIterator(int pageSize,
ConsistencyLevel consistency,
ClientState clientState,
long queryStartNanoTime) |
GroupByPartitionIterator(int pageSize,
ReadExecutionController executionController,
long queryStartNanoTime) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected int |
computeSubPageSize(int pageSize,
int counted)
Computes the size of the next sub-page to retrieve.
|
boolean |
hasNext() |
protected boolean |
isDone(int pageSize,
int counted) |
RowIterator |
next() |
protected QueryPager |
updatePagerLimit(QueryPager pager,
DataLimits limits,
java.nio.ByteBuffer lastPartitionKey,
Clustering<?> lastClustering)
Updates the pager with the new limits if needed.
|
public GroupByPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, long queryStartNanoTime)
public GroupByPartitionIterator(int pageSize, ReadExecutionController executionController, long queryStartNanoTime)
public final void close()
close
in interface java.lang.AutoCloseable
close
in interface BasePartitionIterator<RowIterator>
close
in interface CloseableIterator<RowIterator>
public final boolean hasNext()
hasNext
in interface java.util.Iterator<RowIterator>
protected boolean isDone(int pageSize, int counted)
protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, java.nio.ByteBuffer lastPartitionKey, Clustering<?> lastClustering)
pager
- the pager previoulsy usedlimits
- the DataLimitslastPartitionKey
- the partition key of the last row returnedlastClustering
- the clustering of the last row returnedprotected int computeSubPageSize(int pageSize, int counted)
pageSize
- the top-level page sizecounted
- the number of result returned so far by the previous sub-pagespublic final RowIterator next()
next
in interface java.util.Iterator<RowIterator>
Copyright © 2009-2021 The Apache Software Foundation