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 Object implements ReadQuery
Groups multiple single partition read queries.
  • Field Details

  • Constructor Details

  • Method Details

    • maybeValidateIndex

      public void maybeValidateIndex()
      Description copied from interface: ReadQuery
      If the index manager for the table determines that there's an applicable 2i that can be used to execute this query, call its (optional) validation method to check that nothing in this query's parameters violates the implementation specific validation rules.
      Specified by:
      maybeValidateIndex in interface ReadQuery
    • nowInSec

      public long nowInSec()
      Description copied from interface: ReadQuery
      The 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).

      Specified by:
      nowInSec in interface ReadQuery
      Returns:
      the time (in seconds) to use as "now".
    • 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 TableMetadata metadata()
      Description copied from interface: ReadQuery
      The metadata for the table this is a query on.
      Specified by:
      metadata in interface ReadQuery
      Returns:
      the metadata for the table this is a query on.
    • 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 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:
      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
      Parameters:
      executionController - the ReadExecutionController protecting the read.
      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
    • rowFilter

      public RowFilter rowFilter()
      Description copied from interface: ReadQuery
      Filters/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.

      Specified by:
      rowFilter in interface ReadQuery
      Returns:
      the filter holding the expression that rows must satisfy.
    • columnFilter

      public ColumnFilter columnFilter()
      Description copied from interface: ReadQuery
      A filter on which (non-PK) columns must be returned by the query.
      Specified by:
      columnFilter in interface ReadQuery
      Returns:
      which columns must be fetched by this query.
    • trackWarnings

      public void trackWarnings()
      Specified by:
      trackWarnings in interface ReadQuery
    • toString

      public String toString()
      Overrides:
      toString in class Object