IFilter (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db.filter
Interface IFilter

All Known Implementing Classes:
  IdentityQueryFilter, NamesQueryFilter, SliceQueryFilter

    public interface IFilter

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).

Method Summary
`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)`
`IColumnIterator` | `getMemtableColumnIterator(ColumnFamily cf, DecoratedKey<?> key, AbstractType comparator)` returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.
`IColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable, DecoratedKey<?> key)` returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.
`IColumnIterator` | `getSSTableColumnIterator(SSTableReader sstable, FileDataInput file, DecoratedKey<?> key)` Get an iterator that returns columns from the given SSTable using the opened file matching the Filter criteria in sorted order.
`boolean` | `isReversed()`

Method Detail

### getMemtableColumnIterator

    IColumnIterator getMemtableColumnIterator(ColumnFamily cf,
                                              DecoratedKey<?> key,
                                              AbstractType comparator)

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

### getSSTableColumnIterator

    IColumnIterator getSSTableColumnIterator(SSTableReader sstable,
                                             FileDataInput file,
                                             DecoratedKey<?> key)

  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

    IColumnIterator 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation