Class SinglePartitionReadQuery.Group<T extends SinglePartitionReadQuery>
- All Implemented Interfaces:
ReadQuery
- Direct Known Subclasses:
SinglePartitionReadCommand.Group
- Enclosing interface:
- SinglePartitionReadQuery
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA filter on which (non-PK) columns must be returned by the query.executeInternal(ReadExecutionController controller) Execute the query for internal queries (that is, it basically executes the query locally).executeLocally(ReadExecutionController executionController) Execute the query locally.Starts a new read operation.getPager(PagingState pagingState, ProtocolVersion protocolVersion) Returns a pager for the query.limits()The limits for the query.voidIf the index manager for the table determines that there's an applicable 2i that can be used to execute this query, call its (optional) validation method to check that nothing in this query's parameters violates the implementation specific validation rules.metadata()The metadata for the table this is a query on.longnowInSec()The time in seconds to use as "now" for this query.Filters/Resrictions on CQL rows.booleanselectsClustering(DecoratedKey key, Clustering<?> clustering) booleanChecks if thisReadQueryselects full partitions, that is it has no filtering on clustering or regular columns.booleanselectsKey(DecoratedKey key) toString()void
-
Field Details
-
queries
-
-
Constructor Details
-
Group
-
-
Method Details
-
maybeValidateIndex
public void maybeValidateIndex()Description copied from interface:ReadQueryIf the index manager for the table determines that there's an applicable 2i that can be used to execute this query, call its (optional) validation method to check that nothing in this query's parameters violates the implementation specific validation rules.- Specified by:
maybeValidateIndexin interfaceReadQuery
-
nowInSec
public long nowInSec()Description copied from interface:ReadQueryThe time in seconds to use as "now" for this query.We use the same time as "now" for the whole query to avoid considering different values as expired during the query, which would be buggy (would throw of counting amongst other things).
-
limits
Description copied from interface:ReadQueryThe limits for the query. -
metadata
Description copied from interface:ReadQueryThe metadata for the table this is a query on. -
selectsFullPartition
public boolean selectsFullPartition()Description copied from interface:ReadQueryChecks if thisReadQueryselects full partitions, that is it has no filtering on clustering or regular columns.- Specified by:
selectsFullPartitionin interfaceReadQuery- Returns:
trueif thisReadQueryselects full partitions,falseotherwise.
-
executionController
Description copied from interface:ReadQueryStarts a new read operation.This must be called before
ReadQuery.executeInternal(org.apache.cassandra.db.ReadExecutionController)and passed to it to protect the read. The returned object must be closed on all path and it is thus strongly advised to use it in a try-with-ressource construction.- Specified by:
executionControllerin interfaceReadQuery- Returns:
- a newly started execution controller for this
ReadQuery.
-
executeInternal
Description copied from interface:ReadQueryExecute the query for internal queries (that is, it basically executes the query locally).- Specified by:
executeInternalin interfaceReadQuery- Parameters:
controller- theReadExecutionControllerprotecting the read.- Returns:
- the result of the query.
-
executeLocally
Description copied from interface:ReadQueryExecute the query locally. This is similar toReadQuery.executeInternal(ReadExecutionController)but it returns an unfiltered partition iterator that can be merged later on.- Specified by:
executeLocallyin interfaceReadQuery- Parameters:
executionController- theReadExecutionControllerprotecting the read.- Returns:
- the result of the read query.
-
getPager
Description copied from interface:ReadQueryReturns a pager for the query. -
selectsKey
- Specified by:
selectsKeyin interfaceReadQuery- Returns:
- true if the read query would select the given key, including checks against the row filter, if checkRowFilter is true
-
selectsClustering
- Specified by:
selectsClusteringin interfaceReadQuery- Returns:
- true if the read query would select the given clustering, including checks against the row filter, if checkRowFilter is true
-
rowFilter
Description copied from interface:ReadQueryFilters/Resrictions on CQL rows.This contains the restrictions that are not directly handled by the
ClusteringIndexFilter. More specifically, this includes any non-PK column restrictions and can include some PK columns restrictions when those can't be satisfied entirely by the clustering index filter (because not all clustering columns have been restricted for instance). If there is 2ndary indexes on the table, one of this restriction might be handled by a 2ndary index. -
columnFilter
Description copied from interface:ReadQueryA filter on which (non-PK) columns must be returned by the query.- Specified by:
columnFilterin interfaceReadQuery- Returns:
- which columns must be fetched by this query.
-
trackWarnings
public void trackWarnings()- Specified by:
trackWarningsin interfaceReadQuery
-
toString
-