/** * Updates the pager with the new limits if needed. * * @param pager the pager previoulsy used * @param limits the DataLimits * @param lastPartitionKey the partition key of the last row returned * @param lastClustering the clustering of the last row returned * @return the pager to use to query the next page of data */ protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, ByteBuffer lastPartitionKey, Clustering lastClustering) { GroupingState state = new GroupingState(lastPartitionKey, lastClustering); DataLimits newLimits = limits.forGroupByInternalPaging(state); return pager.withUpdatedLimit(newLimits); }
/** * Updates the pager with the new limits if needed. * * @param pager the pager previoulsy used * @param limits the DataLimits * @param lastPartitionKey the partition key of the last row returned * @param lastClustering the clustering of the last row returned * @return the pager to use to query the next page of data */ protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, ByteBuffer lastPartitionKey, Clustering lastClustering) { GroupingState state = new GroupingState(lastPartitionKey, lastClustering); DataLimits newLimits = limits.forGroupByInternalPaging(state); return pager.withUpdatedLimit(newLimits); }
/** * Updates the pager with the new limits if needed. * * @param pager the pager previoulsy used * @param limits the DataLimits * @param lastPartitionKey the partition key of the last row returned * @param lastClustering the clustering of the last row returned * @return the pager to use to query the next page of data */ protected QueryPager updatePagerLimit(QueryPager pager, DataLimits limits, ByteBuffer lastPartitionKey, Clustering lastClustering) { GroupingState state = new GroupingState(lastPartitionKey, lastClustering); DataLimits newLimits = limits.forGroupByInternalPaging(state); return pager.withUpdatedLimit(newLimits); }