Package org.apache.cassandra.db
Class DataRange.Paging
java.lang.Object
org.apache.cassandra.db.DataRange
org.apache.cassandra.db.DataRange.Paging
- Enclosing class:
- DataRange
Specialized
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.db.DataRange
DataRange.Paging, DataRange.Serializer -
Field Summary
Fields inherited from class org.apache.cassandra.db.DataRange
clusteringIndexFilter, keyRange, serializer -
Method Summary
Modifier and TypeMethodDescriptionThe clustering index filter to use for the provided key.Returns a newDataRangeequivalent tothisone but restricted to the provided sub-range.Clustering<?>booleanisPaging()Whether the data range is for a paged request or not.booleanisUnrestricted(TableMetadata metadata) Whether thisDataRangequeries everything (has no restriction neither on the partition queried, nor within the queried partition).toString(TableMetadata metadata) Methods inherited from class org.apache.cassandra.db.DataRange
allData, allData, appendKeyString, contains, forKeyRange, forPaging, forTokenRange, isNamesQuery, isReversed, isWrapAround, keyRange, selectsAllPartition, startAsByteComparable, startKey, stopAsByteComparable, stopKey, toCQLString
-
Method Details
-
clusteringIndexFilter
Description copied from class:DataRangeThe clustering index filter to use for the provided key.This may or may not be the same filter for all keys (that is, paging range use a different filter for their start key).
- Overrides:
clusteringIndexFilterin classDataRange- Parameters:
key- the partition key for which we want the clustering index filter.- Returns:
- the clustering filter to use for
key.
-
forSubRange
Description copied from class:DataRangeReturns a newDataRangeequivalent tothisone but restricted to the provided sub-range.- Overrides:
forSubRangein classDataRange- Parameters:
range- the sub-range to use for the newly returned data range. Note that assumes thatrangeis 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()).- Returns:
- a new
DataRangeusingrangeas partition key range and the clustering index filter filter fromthis.
-
getLastReturned
- Returns:
- the last Clustering that was returned (in the previous page)
-
isPaging
public boolean isPaging()Description copied from class:DataRangeWhether the data range is for a paged request or not. -
isUnrestricted
Description copied from class:DataRangeWhether thisDataRangequeries everything (has no restriction neither on the partition queried, nor within the queried partition).- Overrides:
isUnrestrictedin classDataRange- Returns:
- Whether this
DataRangequeries everything.
-
toString
-