org.apache.cassandra.db.filter

## Class NamesQueryFilter

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

All Implemented Interfaces:
  IDiskAtomFilter

    public class NamesQueryFilter
    extends java.lang.Object
    implements IDiskAtomFilter

### Nested Class Summary

Nested Classes
`static class` `NamesQueryFilter.Serializer`

### Field Summary

Fields
`java.util.SortedSet<java.nio.ByteBuffer>` `columns`
`static NamesQueryFilter.Serializer` `serializer`

### Constructor Summary

Constructors
Constructor and Description
`NamesQueryFilter(java.nio.ByteBuffer column, java.util.Comparator<java.nio.ByteBuffer> comparator)`
`NamesQueryFilter(java.util.SortedSet<java.nio.ByteBuffer> columns)`
`NamesQueryFilter(java.util.SortedSet<java.nio.ByteBuffer> columns, boolean countCQL3Rows)`

### Method Summary

Methods
`NamesQueryFilter` `cloneShallow()`
`void` `collectReducedColumns(ColumnFamily container, java.util.Iterator<Column> reducedColumns, int gcBefore, long now)` collects columns from reducedColumns into returnCF.
`ColumnCounter` `columnCounter(AbstractType<?> comparator, long now)`
`boolean` `countCQL3Rows()`
`java.util.Comparator<Column>` `getColumnComparator(AbstractType<?> comparator)`
`OnDiskAtomIterator` `getColumnFamilyIterator(DecoratedKey key, ColumnFamily cf)` returns an iterator that returns columns from the given columnFamily matching the Filter criteria in sorted order.
`int` `getLiveCount(ColumnFamily cf, long now)`
`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` `isReversed()`
`boolean` `maySelectPrefix(java.util.Comparator<java.nio.ByteBuffer> cmp, java.nio.ByteBuffer prefix)`
`boolean` `shouldInclude(SSTableReader sstable)`
`java.lang.String` `toString()`
`void` `updateColumnsLimit(int newLimit)`
`NamesQueryFilter` `withUpdatedColumns(java.util.SortedSet<java.nio.ByteBuffer> newColumns)`

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

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

### Field Detail

#### serializer

    public static final NamesQueryFilter.Serializer serializer

#### columns

    public final java.util.SortedSet<java.nio.ByteBuffer> columns

### Constructor Detail

#### NamesQueryFilter

    public NamesQueryFilter(java.util.SortedSet<java.nio.ByteBuffer> columns)

#### NamesQueryFilter

    public NamesQueryFilter(java.util.SortedSet<java.nio.ByteBuffer> columns,
                    boolean countCQL3Rows)

#### NamesQueryFilter

    public NamesQueryFilter(java.nio.ByteBuffer column,
                    java.util.Comparator<java.nio.ByteBuffer> comparator)

### Method Detail

#### cloneShallow

    public NamesQueryFilter cloneShallow()

Specified by:
  `cloneShallow` in interface `IDiskAtomFilter`

#### withUpdatedColumns

    public NamesQueryFilter withUpdatedColumns(java.util.SortedSet<java.nio.ByteBuffer> newColumns)

#### getColumnFamilyIterator

    public OnDiskAtomIterator getColumnFamilyIterator(DecoratedKey key,
                                             ColumnFamily cf)

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

Specified by:
  `getColumnFamilyIterator` in interface `IDiskAtomFilter`

#### getSSTableColumnIterator

    public OnDiskAtomIterator 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 OnDiskAtomIterator 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

#### collectReducedColumns

    public void collectReducedColumns(ColumnFamily container,
                             java.util.Iterator<Column> reducedColumns,
                             int gcBefore,
                             long now)

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`

#### getColumnComparator

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

Specified by:
  `getColumnComparator` in interface `IDiskAtomFilter`

#### 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`

#### getLiveCount

    public int getLiveCount(ColumnFamily cf,
                   long now)

Specified by:
  `getLiveCount` in interface `IDiskAtomFilter`

#### maySelectPrefix

    public boolean maySelectPrefix(java.util.Comparator<java.nio.ByteBuffer> cmp,
                          java.nio.ByteBuffer prefix)

Specified by:
  `maySelectPrefix` in interface `IDiskAtomFilter`

#### shouldInclude

    public boolean shouldInclude(SSTableReader sstable)

Specified by:
  `shouldInclude` in interface `IDiskAtomFilter`

#### countCQL3Rows

    public boolean countCQL3Rows()

#### columnCounter

    public ColumnCounter columnCounter(AbstractType<?> comparator,
                              long now)

Specified by:
  `columnCounter` in interface `IDiskAtomFilter`