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 List<Row> fetchPage(int pageSize) throws RequestValidationException, RequestExecutionException { assert command.filter.countCQL3Rows() || command.filter.columns.size() <= pageSize; if (isExhausted()) return Collections.<Row>emptyList(); queried = true; return localQuery ? Collections.singletonList(command.getRow(Keyspace.open(command.ksName))) : StorageProxy.read(Collections.<ReadCommand>singletonList(command), consistencyLevel, state); }
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); }