Class SinglePartitionReadQuery.Group<T extends SinglePartitionReadQuery>
- java.lang.Object
-
- org.apache.cassandra.db.SinglePartitionReadQuery.Group<T>
-
- All Implemented Interfaces:
ReadQuery
- Direct Known Subclasses:
SinglePartitionReadCommand.Group
- Enclosing interface:
- SinglePartitionReadQuery
public abstract static class SinglePartitionReadQuery.Group<T extends SinglePartitionReadQuery> extends java.lang.Object implements ReadQuery
Groups multiple single partition read queries.
-
-
Constructor Summary
Constructors Constructor Description Group(java.util.List<T> queries, DataLimits limits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnFiltercolumnFilter()A filter on which (non-PK) columns must be returned by the query.PartitionIteratorexecuteInternal(ReadExecutionController controller)Execute the query for internal queries (that is, it basically executes the query locally).UnfilteredPartitionIteratorexecuteLocally(ReadExecutionController executionController)Execute the query locally.ReadExecutionControllerexecutionController()Starts a new read operation.QueryPagergetPager(PagingState pagingState, ProtocolVersion protocolVersion)Returns a pager for the query.DataLimitslimits()The limits for the query.TableMetadatametadata()The metadata for the table this is a query on.intnowInSec()The time in seconds to use as "now" for this query.RowFilterrowFilter()Filters/Resrictions on CQL rows.booleanselectsClustering(DecoratedKey key, Clustering<?> clustering)booleanselectsFullPartition()Checks if thisReadQueryselects full partitions, that is it has no filtering on clustering or regular columns.booleanselectsKey(DecoratedKey key)java.lang.StringtoString()voidtrackWarnings()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.ReadQuery
execute, isEmpty, maybeValidateIndex
-
-
-
-
Field Detail
-
queries
public final java.util.List<T extends SinglePartitionReadQuery> queries
-
-
Constructor Detail
-
Group
public Group(java.util.List<T> queries, DataLimits limits)
-
-
Method Detail
-
nowInSec
public int 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
public DataLimits limits()
Description copied from interface:ReadQueryThe limits for the query.
-
metadata
public TableMetadata 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
public ReadExecutionController 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
public PartitionIterator executeInternal(ReadExecutionController controller)
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
public UnfilteredPartitionIterator executeLocally(ReadExecutionController executionController)
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
public QueryPager getPager(PagingState pagingState, ProtocolVersion protocolVersion)
Description copied from interface:ReadQueryReturns a pager for the query.
-
selectsKey
public boolean selectsKey(DecoratedKey key)
- 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
public boolean selectsClustering(DecoratedKey key, Clustering<?> clustering)
- 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
public RowFilter 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
public ColumnFilter 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-