org.apache.cassandra.db

## Class SinglePartitionReadCommand.Group

- java.lang.Object
- - org.apache.cassandra.db.SinglePartitionReadCommand.Group

All Implemented Interfaces:
  ReadQuery

Enclosing class:
  SinglePartitionReadCommand

    public static class SinglePartitionReadCommand.Group
    extends java.lang.Object
    implements ReadQuery

Groups multiple single partition read commands.

### Field Summary

Fields
`java.util.List<SinglePartitionReadCommand>` `commands`

### Fields inherited from interface org.apache.cassandra.db.ReadQuery

`EMPTY`

### Constructor Summary

Constructors
Constructor and Description
`Group(java.util.List<SinglePartitionReadCommand> commands, DataLimits limits)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### commands

    public final java.util.List<SinglePartitionReadCommand> commands

### Constructor Detail

#### Group

    public Group(java.util.List<SinglePartitionReadCommand> commands,
                 DataLimits limits)

### Method Detail

#### one

    public static SinglePartitionReadCommand.Group one(SinglePartitionReadCommand command)

#### execute

    public PartitionIterator execute(ConsistencyLevel consistency,
                                     ClientState clientState,
                                     long queryStartNanoTime)
                              throws RequestExecutionException

Description copied from interface: `ReadQuery`
Executes the query at the provided consistency level.

Specified by:
  `execute` in interface `ReadQuery`
Parameters:
  `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.
Returns:
  the result of the query.
Throws:
  `RequestExecutionException`

#### nowInSec

    public int nowInSec()

#### limits

    public DataLimits limits()

Description copied from interface: `ReadQuery`
The limits for the query.

Specified by:
  `limits` in interface `ReadQuery`
Returns:
  The limits for the query.

#### metadata

    public CFMetaData metadata()

#### selectsFullPartition

    public boolean selectsFullPartition()

Description copied from interface: `ReadQuery`
Checks if this `ReadQuery` selects full partitions, that is it has no filtering on clustering or regular columns.

Specified by:
  `selectsFullPartition` in interface `ReadQuery`
Returns:
  `true` if this `ReadQuery` selects full partitions, `false` otherwise.

#### executionController

    public ReadExecutionController executionController()

Description copied from interface: `ReadQuery`
Starts a new read operation.

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.

Specified by:
  `executionController` in interface `ReadQuery`
Returns:
  a newly started execution controller for this `ReadQuery`.

#### executeInternal

    public PartitionIterator executeInternal(ReadExecutionController controller)

Description copied from interface: `ReadQuery`
Execute the query for internal queries (that is, it basically executes the query locally).

Specified by:
  `executeInternal` in interface `ReadQuery`
Parameters:
  `controller` - the `ReadExecutionController` protecting the read.
Returns:
  the result of the query.

#### executeLocally

    public UnfilteredPartitionIterator executeLocally(ReadExecutionController executionController)

Description copied from interface: `ReadQuery`
Execute the query locally. This is similar to `ReadQuery.executeInternal(ReadExecutionController)` but it returns an unfiltered partition iterator that can be merged later on.

Specified by:
  `executeLocally` in interface `ReadQuery`
Returns:
  the result of the read query.

#### getPager

    public QueryPager getPager(PagingState pagingState,
                               ProtocolVersion protocolVersion)

Description copied from interface: `ReadQuery`
Returns a pager for the query.

Specified by:
  `getPager` in interface `ReadQuery`
Parameters:
  `pagingState` - the `PagingState` to start from if this is a paging continuation. This can be `null` if this is the start of paging.
  `protocolVersion` - the protocol version to use for the paging state of that pager.
Returns:
  a pager for the query.

#### selectsKey

    public boolean selectsKey(DecoratedKey key)

Specified by:
  `selectsKey` in interface `ReadQuery`
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:
  `selectsClustering` in interface `ReadQuery`
Returns:
  true if the read query would select the given clustering, including checks against the row filter, if checkRowFilter is true

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`