public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
@Override public SinglePartitionPager withUpdatedLimit(DataLimits newLimits) { return new SinglePartitionPager(command.withUpdatedLimit(newLimits), protocolVersion, lastReturned, maxRemaining(), remainingInPartition()); }
@Override public SinglePartitionPager withUpdatedLimit(DataLimits newLimits) { return new SinglePartitionPager(command.withUpdatedLimit(newLimits), protocolVersion, lastReturned, maxRemaining(), remainingInPartition()); }
@Override public SinglePartitionPager withUpdatedLimit(DataLimits newLimits) { return new SinglePartitionPager(command.withUpdatedLimit(newLimits), protocolVersion, lastReturned, maxRemaining(), remainingInPartition()); }
protected RowIterator computeNext() { while (result == null || !result.hasNext()) { if (result != null) { result.close(); counted += pagerMaxRemaining - pagers[current].maxRemaining(); } // We are done if we have reached the page size or in the case of GROUP BY if the current pager // is not exhausted. boolean isDone = counted >= pageSize || (result != null && limit.isGroupByLimit() && !pagers[current].isExhausted()); // isExhausted() will sets us on the first non-exhausted pager if (isDone || isExhausted()) { closed = true; return endOfData(); } pagerMaxRemaining = pagers[current].maxRemaining(); int toQuery = pageSize - counted; result = consistency == null ? pagers[current].fetchPageInternal(toQuery, executionController) : pagers[current].fetchPage(toQuery, consistency, clientState, queryStartNanoTime); } return result.next(); }
protected RowIterator computeNext() { while (result == null || !result.hasNext()) { if (result != null) { result.close(); counted += pagerMaxRemaining - pagers[current].maxRemaining(); } // We are done if we have reached the page size or in the case of GROUP BY if the current pager // is not exhausted. boolean isDone = counted >= pageSize || (result != null && limit.isGroupByLimit() && !pagers[current].isExhausted()); // isExhausted() will sets us on the first non-exhausted pager if (isDone || isExhausted()) { closed = true; return endOfData(); } pagerMaxRemaining = pagers[current].maxRemaining(); int toQuery = pageSize - counted; result = consistency == null ? pagers[current].fetchPageInternal(toQuery, executionController) : pagers[current].fetchPage(toQuery, consistency, clientState, queryStartNanoTime); } return result.next(); }
protected RowIterator computeNext() { while (result == null || !result.hasNext()) { if (result != null) { result.close(); counted += pagerMaxRemaining - pagers[current].maxRemaining(); } // We are done if we have reached the page size or in the case of GROUP BY if the current pager // is not exhausted. boolean isDone = counted >= pageSize || (result != null && limit.isGroupByLimit() && !pagers[current].isExhausted()); // isExhausted() will sets us on the first non-exhausted pager if (isDone || isExhausted()) { closed = true; return endOfData(); } pagerMaxRemaining = pagers[current].maxRemaining(); int toQuery = pageSize - counted; result = consistency == null ? pagers[current].fetchPageInternal(toQuery, executionController) : pagers[current].fetchPage(toQuery, consistency, clientState, queryStartNanoTime); } return result.next(); }