Interface SinglePartitionReadQuery

    • Method Detail

      • create

        static SinglePartitionReadQuery create​(TableMetadata metadata,
                                               long nowInSec,
                                               DecoratedKey key,
                                               ColumnFilter columnFilter,
                                               ClusteringIndexFilter filter)
        Creates a new read query on a single partition.
        Parameters:
        metadata - the table to query.
        nowInSec - the time in seconds to use are "now" for this query.
        key - the partition key for the partition to query.
        columnFilter - the column filter to use for the query.
        filter - the clustering index filter to use for the query.
        Returns:
        a newly created read query. The returned query will use no row filter and have no limits.
      • create

        static SinglePartitionReadQuery create​(TableMetadata metadata,
                                               long nowInSec,
                                               ColumnFilter columnFilter,
                                               RowFilter rowFilter,
                                               DataLimits limits,
                                               DecoratedKey partitionKey,
                                               ClusteringIndexFilter clusteringIndexFilter)
        Creates a new read query on a single partition.
        Parameters:
        metadata - the table to query.
        nowInSec - the time in seconds to use are "now" for this query.
        columnFilter - the column filter to use for the query.
        rowFilter - the row filter to use for the query.
        limits - the limits to use for the query.
        partitionKey - the partition key for the partition to query.
        clusteringIndexFilter - the clustering index filter to use for the query.
        Returns:
        a newly created read query.
      • partitionKey

        DecoratedKey partitionKey()
        Returns the key of the partition queried by this ReadQuery
        Returns:
        the key of the partition queried
      • withUpdatedLimit

        SinglePartitionReadQuery withUpdatedLimit​(DataLimits newLimits)
        Creates a new SinglePartitionReadQuery with the specified limits.
        Parameters:
        newLimits - the new limits
        Returns:
        the new SinglePartitionReadQuery
      • forPaging

        SinglePartitionReadQuery forPaging​(Clustering<?> lastReturned,
                                           DataLimits limits)
        Returns a new SinglePartitionReadQuery suitable to paging from the last returned row.
        Parameters:
        lastReturned - the last row returned by the previous page. The newly created query will only query row that comes after this (in query order). This can be null if this is the first page.
        limits - the limits to use for the page to query.
        Returns:
        the newly create query.
      • getPager

        default SinglePartitionPager 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

        default 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

        default 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