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

org.apache.cassandra.db.filter

## Class QueryFilter

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

-     public class QueryFilter
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `cfName`
    `IDiskAtomFilter` | `filter`
    `DecoratedKey` | `key`
    `long` | `timestamp`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryFilter(DecoratedKey key, java.lang.String cfName, IDiskAtomFilter filter, long timestamp)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `collateColumns(ColumnFamily returnCF, java.util.List<? extends java.util.Iterator<Cell>> toCollate, IDiskAtomFilter filter, int gcBefore, long timestamp)`
    `void` | `collateColumns(ColumnFamily returnCF, java.util.List<? extends java.util.Iterator<Cell>> toCollate, int gcBefore)`
    `void` | `collateOnDiskAtom(ColumnFamily returnCF, java.util.Iterator<? extends OnDiskAtom> toCollate, int gcBefore)`
    `static void` | `collateOnDiskAtom(ColumnFamily returnCF, java.util.List<? extends java.util.Iterator<? extends OnDiskAtom>> toCollate, IDiskAtomFilter filter, int gcBefore, long timestamp)`
    `void` | `collateOnDiskAtom(ColumnFamily returnCF, java.util.List<? extends java.util.Iterator<? extends OnDiskAtom>> toCollate, int gcBefore)`
    `void` | `delete(DeletionInfo target, ColumnFamily source)`
    `static java.util.Iterator<Cell>` | `gatherTombstones(ColumnFamily returnCF, java.util.Iterator<? extends OnDiskAtom> iter)` Given an iterator of on disk atom, returns an iterator that filters the tombstone range markers adding them to `returnCF` and returns the normal column.
    `java.lang.String` | `getColumnFamilyName()`
    `static QueryFilter` | `getIdentityFilter(DecoratedKey key, java.lang.String cfName, long timestamp)` return a QueryFilter object that includes every column in the row.
    `java.util.Iterator<Cell>` | `getIterator(ColumnFamily cf)`
    `static QueryFilter` | `getNamesFilter(DecoratedKey key, java.lang.String cfName, java.util.SortedSet<CellName> columns, long timestamp)`
    `static QueryFilter` | `getSliceFilter(DecoratedKey key, java.lang.String cfName, Composite start, Composite finish, boolean reversed, int limit, long timestamp)`
    `OnDiskAtomIterator` | `getSSTableColumnIterator(SSTableReader sstable)`
    `boolean` | `shouldInclude(SSTableReader sstable)`
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### key

          public final DecoratedKey key

    - #### cfName

          public final java.lang.String cfName

    - #### filter

          public final IDiskAtomFilter filter

    - #### timestamp

          public final long timestamp

  - ### Constructor Detail

    - #### QueryFilter

          public QueryFilter(DecoratedKey key,
                     java.lang.String cfName,
                     IDiskAtomFilter filter,
                     long timestamp)

  - ### Method Detail

    - #### getIterator

          public java.util.Iterator<Cell> getIterator(ColumnFamily cf)

    - #### getSSTableColumnIterator

          public OnDiskAtomIterator getSSTableColumnIterator(SSTableReader sstable)

    - #### collateOnDiskAtom

          public void collateOnDiskAtom(ColumnFamily returnCF,
                               java.util.List<? extends java.util.Iterator<? extends OnDiskAtom>> toCollate,
                               int gcBefore)

    - #### collateOnDiskAtom

          public static void collateOnDiskAtom(ColumnFamily returnCF,
                               java.util.List<? extends java.util.Iterator<? extends OnDiskAtom>> toCollate,
                               IDiskAtomFilter filter,
                               int gcBefore,
                               long timestamp)

    - #### collateOnDiskAtom

          public void collateOnDiskAtom(ColumnFamily returnCF,
                               java.util.Iterator<? extends OnDiskAtom> toCollate,
                               int gcBefore)

    - #### collateColumns

          public void collateColumns(ColumnFamily returnCF,
                            java.util.List<? extends java.util.Iterator<Cell>> toCollate,
                            int gcBefore)

    - #### collateColumns

          public static void collateColumns(ColumnFamily returnCF,
                            java.util.List<? extends java.util.Iterator<Cell>> toCollate,
                            IDiskAtomFilter filter,
                            int gcBefore,
                            long timestamp)

    - #### gatherTombstones

          public static java.util.Iterator<Cell> gatherTombstones(ColumnFamily returnCF,
                                                  java.util.Iterator<? extends OnDiskAtom> iter)

      Given an iterator of on disk atom, returns an iterator that filters the tombstone range markers adding them to `returnCF` and returns the normal column.

    - #### getColumnFamilyName

          public java.lang.String getColumnFamilyName()

    - #### getSliceFilter

          public static QueryFilter getSliceFilter(DecoratedKey key,
                                   java.lang.String cfName,
                                   Composite start,
                                   Composite finish,
                                   boolean reversed,
                                   int limit,
                                   long timestamp)

      Parameters:
        `key` - the row to slice
        `cfName` - column family to query
        `start` - column to start slice at, inclusive; empty for "the first column"
        `finish` - column to stop slice at, inclusive; empty for "the last column"
        `reversed` - true to start with the largest column (as determined by configured sort order) instead of smallest
        `limit` - maximum number of non-deleted columns to return
        `timestamp` - time to use for determining expiring columns' state
      Returns:
        a QueryFilter object to satisfy the given slice criteria:

    - #### getIdentityFilter

          public static QueryFilter getIdentityFilter(DecoratedKey key,
                                      java.lang.String cfName,
                                      long timestamp)

      return a QueryFilter object that includes every column in the row. This is dangerous on large rows; avoid except for test code.

    - #### getNamesFilter

          public static QueryFilter getNamesFilter(DecoratedKey key,
                                   java.lang.String cfName,
                                   java.util.SortedSet<CellName> columns,
                                   long timestamp)

      Parameters:
        `key` - the row to slice
        `cfName` - column family to query
        `columns` - the column names to restrict the results to, sorted in comparator order
      Returns:
        a QueryFilter object that will return columns matching the given names

    - #### toString

          public java.lang.String toString()

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

    - #### shouldInclude

          public boolean shouldInclude(SSTableReader sstable)

    - #### delete

          public void delete(DeletionInfo target,
                    ColumnFamily source)

Copyright © 2014 The Apache Software Foundation