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.Serializer
clusteringIndexFilter, 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, startKey, stopKey, toCQLString
public ClusteringIndexFilter clusteringIndexFilter(DecoratedKey key)
DataRange
This 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 DataRange
key
- the partition key for which we want the clustering index filter.key
.public DataRange forSubRange(AbstractBounds<PartitionPosition> range)
DataRange
DataRange
equivalent to this
one but restricted to the provided sub-range.forSubRange
in class DataRange
range
- 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()
DataRange
public boolean isUnrestricted()
DataRange
DataRange
queries everything (has no restriction neither on the
partition queried, nor within the queried partition).isUnrestricted
in class DataRange
DataRange
queries everything.public java.lang.String toString(CFMetaData metadata)
Copyright © 2017 The Apache Software Foundation