IDiskAtomFilter (apache-cassandra API)
Date: 2018-02-12

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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IDiskAtomFilter` | `cloneShallow()`
    `void` | `collectReducedColumns(ColumnFamily container, java.util.Iterator<Cell> reducedColumns, DecoratedKey key, int gcBefore, long now)` collects columns from reducedColumns into returnCF.
    `ColumnCounter` | `columnCounter(CellNameType comparator, long now)`
    `boolean` | `countCQL3Rows(CellNameType comparator)`
    `java.util.Comparator<Cell>` | `getColumnComparator(CellNameType comparator)`
    `java.util.Iterator<Cell>` | `getColumnIterator(ColumnFamily cf)` returns an iterator that returns columns from the given columnFamily matching the Filter criteria in sorted order.
    `OnDiskAtomIterator` | `getColumnIterator(DecoratedKey key, ColumnFamily cf)`
    `int` | `getLiveCount(ColumnFamily cf, long now)`
    `java.util.Iterator<RangeTombstone>` | `getRangeTombstoneIterator(ColumnFamily source)`
    `OnDiskAtomIterator` | `getSSTableColumnIterator(SSTableReader sstable, DecoratedKey key)` returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.
    `OnDiskAtomIterator` | `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` | `isFullyCoveredBy(ColumnFamily cf, long now)` Whether the provided cf, that is assumed to contain the head of the partition, contains enough data to cover this filter.
    `boolean` | `isHeadFilter()`
    `boolean` | `isReversed()`
    `boolean` | `maySelectPrefix(CType type, Composite prefix)`
    `boolean` | `shouldInclude(SSTableReader sstable)`
    `void` | `updateColumnsLimit(int newLimit)`

- - ### Method Detail

    - #### getColumnIterator

          java.util.Iterator<Cell> getColumnIterator(ColumnFamily cf)

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

    - #### getColumnIterator

          OnDiskAtomIterator getColumnIterator(DecoratedKey key,
                                               ColumnFamily cf)

    - #### getSSTableColumnIterator

          OnDiskAtomIterator 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

          OnDiskAtomIterator 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(ColumnFamily container,
                                     java.util.Iterator<Cell> reducedColumns,
                                     DecoratedKey key,
                                     int gcBefore,
                                     long now)

      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.

    - #### getColumnComparator

          java.util.Comparator<Cell> getColumnComparator(CellNameType comparator)

    - #### isReversed

          boolean isReversed()

    - #### updateColumnsLimit

          void updateColumnsLimit(int newLimit)

    - #### getLiveCount

          int getLiveCount(ColumnFamily cf,
                           long now)

    - #### columnCounter

          ColumnCounter columnCounter(CellNameType comparator,
                                      long now)

    - #### cloneShallow

          IDiskAtomFilter cloneShallow()

    - #### maySelectPrefix

          boolean maySelectPrefix(CType type,
                                  Composite prefix)

    - #### shouldInclude

          boolean shouldInclude(SSTableReader sstable)

    - #### countCQL3Rows

          boolean countCQL3Rows(CellNameType comparator)

    - #### isHeadFilter

          boolean isHeadFilter()

    - #### isFullyCoveredBy

          boolean isFullyCoveredBy(ColumnFamily cf,
                                   long now)

      Whether the provided cf, that is assumed to contain the head of the partition, contains enough data to cover this filter.

    - #### getRangeTombstoneIterator

          java.util.Iterator<RangeTombstone> getRangeTombstoneIterator(ColumnFamily source)

Copyright © 2018 The Apache Software Foundation