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,
Dispatcher.RequestTime requestTime) |
GroupByPartitionIterator(int pageSize,
ReadExecutionController executionController,
Dispatcher.RequestTime requestTime) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, wrap
public GroupByPartitionIterator(int pageSize, ConsistencyLevel consistency, ClientState clientState, Dispatcher.RequestTime requestTime)
public GroupByPartitionIterator(int pageSize, ReadExecutionController executionController, Dispatcher.RequestTime requestTime)
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- The Apache Software Foundation