private ResultMessage.Rows execute(ReadQuery query, QueryOptions options, QueryState state, int nowInSec, int userLimit, long queryStartNanoTime) throws RequestValidationException, RequestExecutionException { try (PartitionIterator data = query.execute(options.getConsistency(), state.getClientState(), queryStartNanoTime)) { return processResults(data, options, nowInSec, userLimit); } }
private ResultMessage.Rows execute(ReadQuery query, QueryOptions options, QueryState state, int nowInSec, int userLimit, long queryStartNanoTime) throws RequestValidationException, RequestExecutionException { try (PartitionIterator data = query.execute(options.getConsistency(), state.getClientState(), queryStartNanoTime)) { return processResults(data, options, nowInSec, userLimit); } }
private ResultMessage.Rows execute(ReadQuery query, QueryOptions options, QueryState state, int nowInSec, int userLimit, long queryStartNanoTime) throws RequestValidationException, RequestExecutionException { try (PartitionIterator data = query.execute(options.getConsistency(), state.getClientState(), queryStartNanoTime)) { return processResults(data, options, nowInSec, userLimit); } }
private ResultMessage.Rows execute(Pageable command, QueryOptions options, int limit, long now, QueryState state) throws RequestValidationException, RequestExecutionException { List<Row> rows; if (command == null) { rows = Collections.<Row>emptyList(); } else { rows = command instanceof Pageable.ReadCommands ? StorageProxy.read(((Pageable.ReadCommands)command).commands, options.getConsistency(), state.getClientState()) : StorageProxy.getRangeSlice((RangeSliceCommand)command, options.getConsistency()); } return processResults(rows, options, limit, now); }
: ((RangeSliceCommand)command).executeLocally()); return processResults(rows, options, limit, now); ResultMessage.Rows msg = processResults(page, options, limit, now);
public ResultMessage.Rows executeInternal(QueryState state, QueryOptions options, int nowInSec, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { int userLimit = getLimit(options); int userPerPartitionLimit = getPerPartitionLimit(options); int pageSize = options.getPageSize(); ReadQuery query = getQuery(options, nowInSec, userLimit, userPerPartitionLimit, pageSize); try (ReadExecutionController executionController = query.executionController()) { if (aggregationSpec == null && (pageSize <= 0 || (query.limits().count() <= pageSize))) { try (PartitionIterator data = query.executeInternal(executionController)) { return processResults(data, options, nowInSec, userLimit); } } else { QueryPager pager = getPager(query, options); return execute(Pager.forInternalQuery(pager, executionController), options, pageSize, nowInSec, userLimit, queryStartNanoTime); } } }
public ResultMessage.Rows executeInternal(QueryState state, QueryOptions options, int nowInSec, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { int userLimit = getLimit(options); int userPerPartitionLimit = getPerPartitionLimit(options); int pageSize = options.getPageSize(); ReadQuery query = getQuery(options, nowInSec, userLimit, userPerPartitionLimit, pageSize); try (ReadExecutionController executionController = query.executionController()) { if (aggregationSpec == null && (pageSize <= 0 || (query.limits().count() <= pageSize))) { try (PartitionIterator data = query.executeInternal(executionController)) { return processResults(data, options, nowInSec, userLimit); } } else { QueryPager pager = getPager(query, options); return execute(Pager.forInternalQuery(pager, executionController), options, pageSize, nowInSec, userLimit, queryStartNanoTime); } } }
try (PartitionIterator page = pager.fetchPage(pageSize, queryStartNanoTime)) msg = processResults(page, options, nowInSec, userLimit);
public ResultMessage.Rows executeInternal(QueryState state, QueryOptions options, int nowInSec, long queryStartNanoTime) throws RequestExecutionException, RequestValidationException { int userLimit = getLimit(options); int userPerPartitionLimit = getPerPartitionLimit(options); int pageSize = options.getPageSize(); ReadQuery query = getQuery(options, nowInSec, userLimit, userPerPartitionLimit, pageSize); try (ReadExecutionController executionController = query.executionController()) { if (aggregationSpec == null && (pageSize <= 0 || (query.limits().count() <= pageSize))) { try (PartitionIterator data = query.executeInternal(executionController)) { return processResults(data, options, nowInSec, userLimit); } } else { QueryPager pager = getPager(query, options); return execute(Pager.forInternalQuery(pager, executionController), options, pageSize, nowInSec, userLimit, queryStartNanoTime); } } }
try (PartitionIterator page = pager.fetchPage(pageSize, queryStartNanoTime)) msg = processResults(page, options, nowInSec, userLimit);
try (PartitionIterator page = pager.fetchPage(pageSize, queryStartNanoTime)) msg = processResults(page, options, nowInSec, userLimit);
ResultMessage.Rows msg = processResults(page, options, limit, now);