public static class SinglePartitionReadCommand.Group extends java.lang.Object implements ReadQuery
Modifier and Type | Field and Description |
---|---|
java.util.List<SinglePartitionReadCommand> |
commands |
Constructor and Description |
---|
Group(java.util.List<SinglePartitionReadCommand> commands,
DataLimits limits) |
Modifier and Type | Method and Description |
---|---|
PartitionIterator |
execute(ConsistencyLevel consistency,
ClientState clientState,
long queryStartNanoTime)
Executes the query at the provided consistency level.
|
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.
|
CFMetaData |
metadata() |
int |
nowInSec() |
static SinglePartitionReadCommand.Group |
one(SinglePartitionReadCommand command) |
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() |
public final java.util.List<SinglePartitionReadCommand> commands
public Group(java.util.List<SinglePartitionReadCommand> commands, DataLimits limits)
public static SinglePartitionReadCommand.Group one(SinglePartitionReadCommand command)
public PartitionIterator execute(ConsistencyLevel consistency, ClientState clientState, long queryStartNanoTime) throws RequestExecutionException
ReadQuery
execute
in interface ReadQuery
consistency
- the consistency level to achieve for the query.clientState
- the ClientState
for the query. In practice, this can be null unless
consistency
is a serial consistency.RequestExecutionException
public int nowInSec()
public DataLimits limits()
ReadQuery
public CFMetaData metadata()
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
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 java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 The Apache Software Foundation