org.apache.cassandra.db.filter
Class SliceQueryFilter

java.lang.Object
  extended by org.apache.cassandra.db.filter.QueryFilter
      extended by org.apache.cassandra.db.filter.SliceQueryFilter
Direct Known Subclasses:
IdentityQueryFilter

public class SliceQueryFilter
extends QueryFilter


Field Summary
 int count
           
 byte[] finish
           
 boolean reversed
           
 byte[] start
           
 
Fields inherited from class org.apache.cassandra.db.filter.QueryFilter
key, path
 
Constructor Summary
SliceQueryFilter(java.lang.String key, QueryPath columnParent, byte[] start, byte[] finish, boolean reversed, int count)
           
 
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)
           
 ColumnIterator getMemColumnIterator(Memtable memtable, ColumnFamily cf, AbstractType comparator)
          returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.
 ColumnIterator getSSTableColumnIterator(SSTableReader sstable)
          returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.
 
Methods inherited from class org.apache.cassandra.db.filter.QueryFilter
collectCollatedColumns, getColumnFamilyName, getMemColumnIterator, isRelevant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public final byte[] start

finish

public final byte[] finish

reversed

public final boolean reversed

count

public final int count
Constructor Detail

SliceQueryFilter

public SliceQueryFilter(java.lang.String key,
                        QueryPath columnParent,
                        byte[] start,
                        byte[] finish,
                        boolean reversed,
                        int count)
Method Detail

getMemColumnIterator

public ColumnIterator getMemColumnIterator(Memtable memtable,
                                           ColumnFamily cf,
                                           AbstractType comparator)
Description copied from class: QueryFilter
returns an iterator that returns columns from the given memtable matching the Filter criteria in sorted order.

Specified by:
getMemColumnIterator in class QueryFilter

getSSTableColumnIterator

public ColumnIterator getSSTableColumnIterator(SSTableReader sstable)
                                        throws java.io.IOException
Description copied from class: QueryFilter
returns an iterator that returns columns from the given SSTable matching the Filter criteria in sorted order.

Specified by:
getSSTableColumnIterator in class QueryFilter
Throws:
java.io.IOException

filterSuperColumn

public SuperColumn filterSuperColumn(SuperColumn superColumn,
                                     int gcBefore)
Description copied from class: QueryFilter
subcolumns of a supercolumn are unindexed, so to pick out parts of those we operate in-memory.

Specified by:
filterSuperColumn in class QueryFilter
Parameters:
superColumn - may be modified by filtering op.

getColumnComparator

public java.util.Comparator<IColumn> getColumnComparator(AbstractType comparator)
Overrides:
getColumnComparator in class QueryFilter

collectReducedColumns

public void collectReducedColumns(IColumnContainer container,
                                  java.util.Iterator<IColumn> reducedColumns,
                                  int gcBefore)
Description copied from class: QueryFilter
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 class QueryFilter


Copyright © 2010 The Apache Software Foundation