org.apache.cassandra.db.filter

## Interface IDiskAtomFilter

- All Known Implementing Classes:
    IdentityQueryFilter, NamesQueryFilter, SliceQueryFilter

      public interface IDiskAtomFilter

  Given an implementation-specific description of what columns to look for, provides methods to extract the desired columns from a Memtable, SSTable, or SuperColumn. Either the get*ColumnIterator methods will be called, or filterSuperColumn, but not both on the same object. QueryFilter takes care of putting the two together if subcolumn filtering needs to be done, based on the querypath that it knows (but that IFilter implementations are oblivious to).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `IDiskAtomFilter.Serializer`

  - ### 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.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` | `isReversed()`
    `void` | `updateColumnsLimit(int newLimit)`

- - ### Method Detail

    - #### getMemtableColumnIterator

          OnDiskAtomIterator getMemtableColumnIterator(ColumnFamily cf,
                                                     DecoratedKey key)

      returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.

    - #### getSSTableColumnIterator

          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.
      Parameters:
        `sstable` -
        `file` - Already opened file data input, saves us opening another one
        `key` - The key of the row we are about to iterate over

    - #### getSSTableColumnIterator

          ISSTableColumnIterator getSSTableColumnIterator(SSTableReader sstable,
                                                        DecoratedKey key)

      returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.

    - #### collectReducedColumns

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

      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.

    - #### filterSuperColumn

          SuperColumn filterSuperColumn(SuperColumn superColumn,
                                      int gcBefore)

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

    - #### getColumnComparator

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

    - #### isReversed

          boolean isReversed()

    - #### updateColumnsLimit

          void updateColumnsLimit(int newLimit)

    - #### getLiveCount

          int getLiveCount(ColumnFamily cf)

Copyright © 2014 The Apache Software Foundation