public abstract static class SinglePartitionReadQuery.Group<T extends SinglePartitionReadQuery> extends java.lang.Object implements ReadQuery
Constructor and Description |
---|
Group(java.util.List<T> queries,
DataLimits limits) |
Modifier and Type | Method and Description |
---|---|
ColumnFilter |
columnFilter()
A filter on which (non-PK) columns must be returned by the query.
|
PartitionIterator |
executeInternal(ReadExecutionController controller)
Execute the query for internal queries (that is, it basically executes the query locally).
|
UnfilteredPartitionIterator |
executeLocally(ReadExecutionController executionController)
Execute the query locally.
|
ReadExecutionController |
executionController()
Starts a new read operation.
|
QueryPager |
getPager(PagingState pagingState,
ProtocolVersion protocolVersion)
Returns a pager for the query.
|
DataLimits |
limits()
The limits for the query.
|
TableMetadata |
metadata()
The metadata for the table this is a query on.
|
int |
nowInSec()
The time in seconds to use as "now" for this query.
|
RowFilter |
rowFilter()
Filters/Resrictions on CQL rows.
|
boolean |
selectsClustering(DecoratedKey key,
Clustering<?> clustering) |
boolean |
selectsFullPartition()
Checks if this
ReadQuery selects full partitions, that is it has no filtering on clustering or regular columns. |
boolean |
selectsKey(DecoratedKey key) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
empty, execute, isEmpty, maybeValidateIndex
public final java.util.List<T extends SinglePartitionReadQuery> queries
public Group(java.util.List<T> queries, DataLimits limits)
public int nowInSec()
ReadQuery
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).
public DataLimits limits()
ReadQuery
public TableMetadata metadata()
ReadQuery
public boolean selectsFullPartition()
ReadQuery
ReadQuery
selects full partitions, that is it has no filtering on clustering or regular columns.selectsFullPartition
in interface ReadQuery
true
if this ReadQuery
selects full partitions, false
otherwise.public ReadExecutionController executionController()
ReadQuery
This must be called before executeInternal
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.
executionController
in interface ReadQuery
ReadQuery
.public PartitionIterator executeInternal(ReadExecutionController controller)
ReadQuery
executeInternal
in interface ReadQuery
controller
- the ReadExecutionController
protecting the read.public UnfilteredPartitionIterator executeLocally(ReadExecutionController executionController)
ReadQuery
ReadQuery.executeInternal(ReadExecutionController)
but it returns an unfiltered partition iterator that can be merged later on.executeLocally
in interface ReadQuery
executionController
- the ReadExecutionController
protecting the read.public QueryPager getPager(PagingState pagingState, ProtocolVersion protocolVersion)
ReadQuery
public boolean selectsKey(DecoratedKey key)
selectsKey
in interface ReadQuery
public boolean selectsClustering(DecoratedKey key, Clustering<?> clustering)
selectsClustering
in interface ReadQuery
public RowFilter rowFilter()
ReadQuery
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.
public ColumnFilter columnFilter()
ReadQuery
columnFilter
in interface ReadQuery
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009-2022 The Apache Software Foundation