DataRange (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.db

## Class DataRange

- java.lang.Object
- - org.apache.cassandra.db.DataRange

- Direct Known Subclasses:
    DataRange.Paging

      public class DataRange
      extends java.lang.Object

  Groups key range and column filter for range queries. The main "trick" of this class is that the column filter can only be obtained by providing the row key on which the column filter will be applied (which we always know before actually querying the columns). This allows the paging DataRange to return a filter for most rows but a potentially different ones for the starting and stopping key. Could allow more fancy stuff in the future too, like column filters that depend on the actual key value :)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DataRange.Paging`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected IDiskAtomFilter` | `columnFilter`
    `protected boolean` | `selectFullRow`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataRange(AbstractBounds<RowPosition> range, IDiskAtomFilter columnFilter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DataRange` | `allData(IPartitioner partitioner)`
    `IDiskAtomFilter` | `columnFilter(java.nio.ByteBuffer rowKey)`
    `boolean` | `contains(RowPosition pos)`
    `static DataRange` | `forKeyRange(Range<Token> keyRange)`
    `int` | `getLiveCount(ColumnFamily data, long now)`
    `static boolean` | `isFullRowSlice(SliceQueryFilter filter)`
    `boolean` | `isWrapAround()`
    `AbstractBounds<RowPosition>` | `keyRange()`
    `boolean` | `selectsFullRowFor(java.nio.ByteBuffer rowKey)`
    `RowPosition` | `startKey()`
    `RowPosition` | `stopKey()`
    `void` | `updateColumnsLimit(int count)`

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

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

- - ### Field Detail

    - #### columnFilter

          protected IDiskAtomFilter columnFilter

    - #### selectFullRow

          protected final boolean selectFullRow

  - ### Constructor Detail

    - #### DataRange

          public DataRange(AbstractBounds<RowPosition> range,
                   IDiskAtomFilter columnFilter)

  - ### Method Detail

    - #### isFullRowSlice

          public static boolean isFullRowSlice(SliceQueryFilter filter)

    - #### allData

          public static DataRange allData(IPartitioner partitioner)

    - #### forKeyRange

          public static DataRange forKeyRange(Range<Token> keyRange)

    - #### keyRange

          public AbstractBounds<RowPosition> keyRange()

    - #### startKey

          public RowPosition startKey()

    - #### stopKey

          public RowPosition stopKey()

    - #### isWrapAround

          public boolean isWrapAround()

    - #### contains

          public boolean contains(RowPosition pos)

    - #### getLiveCount

          public int getLiveCount(ColumnFamily data,
                         long now)

    - #### selectsFullRowFor

          public boolean selectsFullRowFor(java.nio.ByteBuffer rowKey)

    - #### columnFilter

          public IDiskAtomFilter columnFilter(java.nio.ByteBuffer rowKey)

    - #### updateColumnsLimit

          public void updateColumnsLimit(int count)

Copyright © 2014 The Apache Software Foundation