org.apache.cassandra.db.filter

## Class SliceQueryFilter

- java.lang.Object
- - org.apache.cassandra.db.filter.SliceQueryFilter

- All Implemented Interfaces:
    IDiskAtomFilter
  Direct Known Subclasses:
    IdentityQueryFilter

      public class SliceQueryFilter
      extends java.lang.Object
      implements IDiskAtomFilter

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SliceQueryFilter.Serializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `count`
    `boolean` | `reversed`
    `static SliceQueryFilter.Serializer` | `serializer`
    `ColumnSlice[]` | `slices`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SliceQueryFilter(java.nio.ByteBuffer start, java.nio.ByteBuffer finish, boolean reversed, int count)`
    `SliceQueryFilter(java.nio.ByteBuffer start, java.nio.ByteBuffer finish, boolean reversed, int count, int compositesToGroup)`
    `SliceQueryFilter(ColumnSlice[] slices, boolean reversed, int count)` Constructor that accepts multiple slices.
    `SliceQueryFilter(ColumnSlice[] slices, boolean reversed, int count, int compositesToGroup, int countMutliplierForCompatibility)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collectReducedColumns(IColumnContainer container, java.util.Iterator<IColumn> reducedColumns, int gcBefore)` collects columns from reducedColumns into returnCF.
    `SuperColumn` | `filterSuperColumn(SuperColumn superColumn, int gcBefore)` subcolumns of a supercolumn are unindexed, so to pick out parts of those we operate in-memory.
    `java.nio.ByteBuffer` | `finish()`
    `java.util.Comparator<IColumn>` | `getColumnComparator(AbstractType<?> comparator)`
    `int` | `getLiveCount(ColumnFamily cf)`
    `OnDiskAtomIterator` | `getMemtableColumnIterator(ColumnFamily cf, DecoratedKey key)` returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.
    `ISSTableColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable, DecoratedKey key)` returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.
    `ISSTableColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry)` Get an iterator that returns columns from the given SSTable using the opened file matching the Filter criteria in sorted order.
    `boolean` | `includes(java.util.Comparator<java.nio.ByteBuffer> cmp, java.nio.ByteBuffer name)`
    `boolean` | `isReversed()`
    `int` | `lastCounted()`
    `int` | `lastIgnored()`
    `int` | `lastLive()`
    `void` | `setStart(java.nio.ByteBuffer start)`
    `java.nio.ByteBuffer` | `start()`
    `java.lang.String` | `toString()`
    `void` | `trim(ColumnFamily cf, int trimTo)`
    `void` | `updateColumnsLimit(int newLimit)`
    `SliceQueryFilter` | `withUpdatedCount(int newCount)`
    `SliceQueryFilter` | `withUpdatedSlices(ColumnSlice[] newSlices)`

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

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

- - ### Field Detail

    - #### serializer

          public static final SliceQueryFilter.Serializer serializer

    - #### slices

          public final ColumnSlice[] slices

    - #### reversed

          public final boolean reversed

    - #### count

          public volatile int count

  - ### Constructor Detail

    - #### SliceQueryFilter

          public SliceQueryFilter(java.nio.ByteBuffer start,
                          java.nio.ByteBuffer finish,
                          boolean reversed,
                          int count)

    - #### SliceQueryFilter

          public SliceQueryFilter(java.nio.ByteBuffer start,
                          java.nio.ByteBuffer finish,
                          boolean reversed,
                          int count,
                          int compositesToGroup)

    - #### SliceQueryFilter

          public SliceQueryFilter(ColumnSlice[] slices,
                          boolean reversed,
                          int count)

      Constructor that accepts multiple slices. All slices are assumed to be in the same direction (forward or reversed).

    - #### SliceQueryFilter

          public SliceQueryFilter(ColumnSlice[] slices,
                          boolean reversed,
                          int count,
                          int compositesToGroup,
                          int countMutliplierForCompatibility)

  - ### Method Detail

    - #### withUpdatedCount

          public SliceQueryFilter withUpdatedCount(int newCount)

    - #### withUpdatedSlices

          public SliceQueryFilter withUpdatedSlices(ColumnSlice[] newSlices)

    - #### getMemtableColumnIterator

          public OnDiskAtomIterator getMemtableColumnIterator(ColumnFamily cf,
                                                     DecoratedKey key)

      Description copied from interface: `IDiskAtomFilter`
      returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.
      Specified by:
        `getMemtableColumnIterator` in interface `IDiskAtomFilter`

    - #### getSSTableColumnIterator

          public ISSTableColumnIterator getSSTableColumnIterator(SSTableReader sstable,
                                                        DecoratedKey key)

      Description copied from interface: `IDiskAtomFilter`
      returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.
      Specified by:
        `getSSTableColumnIterator` in interface `IDiskAtomFilter`

    - #### getSSTableColumnIterator

          public ISSTableColumnIterator getSSTableColumnIterator(SSTableReader sstable,
                                                        FileDataInput file,
                                                        DecoratedKey key,
                                                        RowIndexEntry indexEntry)

      Description copied from interface: `IDiskAtomFilter`
      Get an iterator that returns columns from the given SSTable using the opened file matching the Filter criteria in sorted order.
      Specified by:
        `getSSTableColumnIterator` in interface `IDiskAtomFilter`
        `file` - Already opened file data input, saves us opening another one
        `key` - The key of the row we are about to iterate over

    - #### filterSuperColumn

          public SuperColumn filterSuperColumn(SuperColumn superColumn,
                                      int gcBefore)

      Description copied from interface: `IDiskAtomFilter`
      subcolumns of a supercolumn are unindexed, so to pick out parts of those we operate in-memory.
      Specified by:
        `filterSuperColumn` in interface `IDiskAtomFilter`
      Parameters:
        `superColumn` - may be modified by filtering op.

    - #### getColumnComparator

          public java.util.Comparator<IColumn> getColumnComparator(AbstractType<?> comparator)

      Specified by:
        `getColumnComparator` in interface `IDiskAtomFilter`

    - #### collectReducedColumns

          public void collectReducedColumns(IColumnContainer container,
                                   java.util.Iterator<IColumn> reducedColumns,
                                   int gcBefore)

      Description copied from interface: `IDiskAtomFilter`
      collects columns from reducedColumns into returnCF. Termination is determined by the filter code, which should have some limit on the number of columns to avoid running out of memory on large rows.
      Specified by:
        `collectReducedColumns` in interface `IDiskAtomFilter`

    - #### getLiveCount

          public int getLiveCount(ColumnFamily cf)

      Specified by:
        `getLiveCount` in interface `IDiskAtomFilter`

    - #### trim

          public void trim(ColumnFamily cf,
                  int trimTo)

    - #### start

          public java.nio.ByteBuffer start()

    - #### finish

          public java.nio.ByteBuffer finish()

    - #### setStart

          public void setStart(java.nio.ByteBuffer start)

    - #### lastCounted

          public int lastCounted()

    - #### lastIgnored

          public int lastIgnored()

    - #### lastLive

          public int lastLive()

    - #### toString

          public java.lang.String toString()

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

    - #### isReversed

          public boolean isReversed()

      Specified by:
        `isReversed` in interface `IDiskAtomFilter`

    - #### updateColumnsLimit

          public void updateColumnsLimit(int newLimit)

      Specified by:
        `updateColumnsLimit` in interface `IDiskAtomFilter`

    - #### includes

          public boolean includes(java.util.Comparator<java.nio.ByteBuffer> cmp,
                         java.nio.ByteBuffer name)

Copyright © 2014 The Apache Software Foundation