public interface ReadQuery
The main implementation of this is ReadCommand but we have this interface because
SinglePartitionReadCommand.Group is also consider as a "read query" but is not a
ReadCommand.
| Modifier and Type | Method and Description |
|---|---|
PartitionIterator |
execute(ConsistencyLevel consistency,
ClientState clientState)
Executes the query at the provided consistency level.
|
PartitionIterator |
executeInternal(ReadOrderGroup orderGroup)
Execute the query for internal queries (that is, it basically executes the query locally).
|
QueryPager |
getPager(PagingState pagingState)
Returns a pager for the query.
|
DataLimits |
limits()
The limits for the query.
|
ReadOrderGroup |
startOrderGroup()
Starts a new read operation.
|
static final ReadQuery EMPTY
ReadOrderGroup startOrderGroup()
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.
ReadQuery.PartitionIterator execute(ConsistencyLevel consistency, ClientState clientState) throws RequestExecutionException
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.RequestExecutionExceptionPartitionIterator executeInternal(ReadOrderGroup orderGroup)
orderGroup - the ReadOrderGroup protecting the read.QueryPager getPager(PagingState pagingState)
pagingState - the PagingState to start from if this is a paging continuation. This can be
null if this is the start of paging.DataLimits limits()
Copyright © 2015 The Apache Software Foundation