public PagingState state() { // Sets current to the first non-exhausted pager if (isExhausted()) return null; PagingState state = pagers[current].state(); return new PagingState(pagers[current].key(), state == null ? null : state.rowMark, remaining, pagers[current].remainingInPartition()); }
public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
private static QueryPager pager(ReadCommand command, ConsistencyLevel consistencyLevel, ClientState cState, boolean local, PagingState state) { if (command instanceof SliceByNamesReadCommand) return new NamesQueryPager((SliceByNamesReadCommand)command, consistencyLevel, cState, local); else return new SliceQueryPager((SliceFromReadCommand)command, consistencyLevel, cState, local, state); }
/** * Fetchs the next sub-page. * * @param subPageSize the sub-page size in number of groups * @return the next sub-page */ private final PartitionIterator fetchSubPage(int subPageSize) { return consistency != null ? subPager.fetchPage(subPageSize, consistency, clientState, queryStartNanoTime) : subPager.fetchPageInternal(subPageSize, executionController); }
public PartitionIterator fetchPage(int pageSize, long queryStartNanoTime) { return pager.fetchPage(pageSize, consistency, clientState, queryStartNanoTime); } }
public boolean isExhausted() { if (remaining <= 0 || pagers == null) return true; while (current < pagers.length) { if (!pagers[current].isExhausted()) return false; current++; } return true; }
@Override public boolean isExhausted() { return subPager.isExhausted(); }
@Override public PagingState state() { return subPager.state(); }
public final boolean hasNext() { if (endOfData) return false; if (next != null) return true; fetchNextRowIterator(); return next != null; }
public PartitionRangeQueryPager(ReadCommand command, ProtocolVersion protocolVersion, DecoratedKey lastReturnedKey, PagingState.RowMark lastReturnedRow, int remaining, int remainingInPartition) { super(command, protocolVersion); this.lastReturnedKey = lastReturnedKey; this.lastReturnedRow = lastReturnedRow; restoreState(lastReturnedKey, remaining, remainingInPartition); }
public PartitionIterator fetchPage(int pageSize, long queryStartNanoTime) { return pager.fetchPageInternal(pageSize, executionController); } }
public PagingState state() { // Sets current to the first non-exhausted pager if (isExhausted()) return null; PagingState state = pagers[current].state(); return new PagingState(pagers[current].key(), state == null ? null : state.rowMark, remaining, pagers[current].remainingInPartition()); }
public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
/** * Fetchs the next sub-page. * * @param subPageSize the sub-page size in number of groups * @return the next sub-page */ private final PartitionIterator fetchSubPage(int subPageSize) { return consistency != null ? subPager.fetchPage(subPageSize, consistency, clientState, queryStartNanoTime) : subPager.fetchPageInternal(subPageSize, executionController); }
public PartitionIterator fetchPage(int pageSize, long queryStartNanoTime) { return pager.fetchPage(pageSize, consistency, clientState, queryStartNanoTime); } }
public boolean isExhausted() { if (remaining <= 0 || pagers == null) return true; while (current < pagers.length) { if (!pagers[current].isExhausted()) return false; current++; } return true; }
private static SinglePartitionPager makePager(ReadCommand command, ConsistencyLevel consistencyLevel, ClientState cState, boolean localQuery, PagingState state) { return command instanceof SliceFromReadCommand ? new SliceQueryPager((SliceFromReadCommand)command, consistencyLevel, cState, localQuery, state) : new NamesQueryPager((SliceByNamesReadCommand)command, consistencyLevel, cState, localQuery); }
public PagingState state() { // Sets current to the first non-exhausted pager if (isExhausted()) return null; PagingState state = pagers[current].state(); return new PagingState(pagers[current].key(), state == null ? null : state.rowMark, remaining, pagers[current].remainingInPartition()); }
public PagingState state() { return lastReturned == null ? null : new PagingState(null, lastReturned, maxRemaining(), remainingInPartition()); }
public PagingState state() { // Sets current to the first non-exhausted pager if (isExhausted()) return null; PagingState state = pagers[current].state(); return new PagingState(pagers[current].key(), state == null ? null : state.cellName, remaining); }