use of com.datastax.oss.driver.internal.core.cql.DefaultRow in project java-driver by datastax.
the class ContinuousCqlRequestHandler method createResultSet.
@NonNull
@Override
protected DefaultContinuousAsyncResultSet createResultSet(@NonNull Statement<?> statement, @NonNull Rows rows, @NonNull ExecutionInfo executionInfo, @NonNull ColumnDefinitions columnDefinitions) {
Queue<List<ByteBuffer>> data = rows.getData();
CountingIterator<Row> iterator = new CountingIterator<Row>(data.size()) {
@Override
protected Row computeNext() {
List<ByteBuffer> rowData = data.poll();
return (rowData == null) ? endOfData() : new DefaultRow(columnDefinitions, rowData, context);
}
};
DseRowsMetadata metadata = (DseRowsMetadata) rows.getMetadata();
return new DefaultContinuousAsyncResultSet(iterator, columnDefinitions, metadata.continuousPageNumber, !metadata.isLastContinuousPage, executionInfo, this);
}
Aggregations