public static class DataRange.Paging extends DataRange
DataRange used for the paging case.
It uses the clustering of the last result of the previous page to restrict the filter on the first queried partition (the one for that last result) so it only fetch results that follow that last result. In other words, this makes sure this resume paging where we left off.
DataRange.Paging, DataRange.SerializerclusteringIndexFilter, keyRange, serializer| Modifier and Type | Method and Description |
|---|---|
ClusteringIndexFilter |
clusteringIndexFilter(DecoratedKey key)
The clustering index filter to use for the provided key.
|
DataRange |
forSubRange(AbstractBounds<PartitionPosition> range)
Returns a new
DataRange equivalent to this one but restricted to the provided sub-range. |
Clustering |
getLastReturned() |
boolean |
isPaging()
Whether the data range is for a paged request or not.
|
boolean |
isUnrestricted()
Whether this
DataRange queries everything (has no restriction neither on the
partition queried, nor within the queried partition). |
java.lang.String |
toString(CFMetaData metadata) |
allData, allData, appendKeyString, contains, forKeyRange, forPaging, forTokenRange, isNamesQuery, isWrapAround, keyRange, selectsAllPartition, startKey, stopKey, toCQLStringpublic ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key)
DataRangeThis may or may not be the same filter for all keys (that is, paging range use a different filter for their start key).
clusteringIndexFilter in class DataRangekey - the partition key for which we want the clustering index filter.key.public DataRange forSubRange(AbstractBounds<PartitionPosition> range)
DataRangeDataRange equivalent to this one but restricted to the provided sub-range.forSubRange in class DataRangerange - the sub-range to use for the newly returned data range. Note that assumes that range is a proper
sub-range of the initial range but doesn't validate it. You should make sure to only provided sub-ranges however or this
might throw off the paging case (see Paging.forSubRange()).DataRange using range as partition key range and the clustering index filter filter from this.public Clustering getLastReturned()
public boolean isPaging()
DataRangepublic boolean isUnrestricted()
DataRangeDataRange queries everything (has no restriction neither on the
partition queried, nor within the queried partition).isUnrestricted in class DataRangeDataRange queries everything.public java.lang.String toString(CFMetaData metadata)
Copyright © 2018 The Apache Software Foundation