Class SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand

All Implemented Interfaces:
Monitorable, ReadQuery, SinglePartitionReadQuery
Enclosing class:
SinglePartitionReadCommand

public static class SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand extends SinglePartitionReadCommand
  • Constructor Details

  • Method Details

    • execute

      public PartitionIterator execute(ConsistencyLevel consistency, ClientState state, Dispatcher.RequestTime requestTime) throws RequestExecutionException
      Description copied from interface: ReadQuery
      Executes the query at the provided consistency level.
      Specified by:
      execute in interface ReadQuery
      Overrides:
      execute in class SinglePartitionReadCommand
      Parameters:
      consistency - the consistency level to achieve for the query.
      state - client state
      requestTime - request enqueue / and start times
      Returns:
      the result of the query.
      Throws:
      RequestExecutionException
    • executeLocally

      public UnfilteredPartitionIterator executeLocally(ReadExecutionController executionController)
      Description copied from class: ReadCommand
      Executes this command on the local host.
      Specified by:
      executeLocally in interface ReadQuery
      Overrides:
      executeLocally in class ReadCommand
      Parameters:
      executionController - the execution controller spanning this command
      Returns:
      an iterator over the result of executing this command locally.
    • 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
      Overrides:
      executionController in class ReadCommand
      Returns:
      a newly started execution controller for this ReadQuery.
    • executionController

      public ReadExecutionController executionController(boolean trackRepairedStatus)
      Overrides:
      executionController in class ReadCommand
    • 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.
    • 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.
    • 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.
    • 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".
    • 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.
    • toCQLString

      public String toCQLString()
      Recreate the CQL string corresponding to this query.

      Note that in general the returned string will not be exactly the original user string, first because there isn't always a single syntax for a given query, but also because we don't have all the information needed (we know the non-PK columns queried but not the PK ones as internally we query them all). So this shouldn't be relied too strongly, but this should be good enough for debugging purpose which is what this is for.