public class SliceQueryFilter extends java.lang.Object implements IDiskAtomFilter
| Modifier and Type | Class and Description |
|---|---|
static class |
SliceQueryFilter.Serializer |
| Modifier and Type | Field and Description |
|---|---|
int |
compositesToGroup |
int |
count |
static int |
IGNORE_TOMBSTONED_PARTITIONS
A special value for compositesToGroup that indicates that partitioned tombstones should not be included in results
or count towards the limit.
|
boolean |
reversed |
static SliceQueryFilter.Serializer |
serializer |
ColumnSlice[] |
slices |
| Constructor and Description |
|---|
SliceQueryFilter(java.nio.ByteBuffer start,
java.nio.ByteBuffer finish,
boolean reversed,
int count) |
SliceQueryFilter(java.nio.ByteBuffer start,
java.nio.ByteBuffer finish,
boolean reversed,
int count,
int compositesToGroup) |
SliceQueryFilter(ColumnSlice[] slices,
boolean reversed,
int count)
Constructor that accepts multiple slices.
|
SliceQueryFilter(ColumnSlice[] slices,
boolean reversed,
int count,
int compositesToGroup) |
| Modifier and Type | Method and Description |
|---|---|
SliceQueryFilter |
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) |
java.nio.ByteBuffer |
finish() |
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() |
int |
lastCounted() |
int |
lastIgnored() |
int |
lastLive() |
boolean |
maySelectPrefix(java.util.Comparator<java.nio.ByteBuffer> cmp,
java.nio.ByteBuffer prefix) |
protected boolean |
respectTombstoneThresholds() |
void |
setStart(java.nio.ByteBuffer start) |
boolean |
shouldInclude(SSTableReader sstable) |
java.nio.ByteBuffer |
start() |
java.lang.String |
toString() |
void |
trim(ColumnFamily cf,
int trimTo,
long now) |
void |
updateColumnsLimit(int newLimit) |
SliceQueryFilter |
withUpdatedCount(int newCount) |
SliceQueryFilter |
withUpdatedSlice(java.nio.ByteBuffer start,
java.nio.ByteBuffer finish) |
SliceQueryFilter |
withUpdatedSlices(ColumnSlice[] newSlices) |
SliceQueryFilter |
withUpdatedStart(java.nio.ByteBuffer newStart,
AbstractType<?> comparator) |
public static final SliceQueryFilter.Serializer serializer
public static final int IGNORE_TOMBSTONED_PARTITIONS
public final ColumnSlice[] slices
public final boolean reversed
public volatile int count
public final int compositesToGroup
public SliceQueryFilter(java.nio.ByteBuffer start,
java.nio.ByteBuffer finish,
boolean reversed,
int count)
public SliceQueryFilter(java.nio.ByteBuffer start,
java.nio.ByteBuffer finish,
boolean reversed,
int count,
int compositesToGroup)
public SliceQueryFilter(ColumnSlice[] slices, boolean reversed, int count)
public SliceQueryFilter(ColumnSlice[] slices, boolean reversed, int count, int compositesToGroup)
public SliceQueryFilter cloneShallow()
cloneShallow in interface IDiskAtomFilterpublic SliceQueryFilter withUpdatedCount(int newCount)
public SliceQueryFilter withUpdatedSlices(ColumnSlice[] newSlices)
public SliceQueryFilter withUpdatedStart(java.nio.ByteBuffer newStart, AbstractType<?> comparator)
public SliceQueryFilter withUpdatedSlice(java.nio.ByteBuffer start, java.nio.ByteBuffer finish)
public OnDiskAtomIterator getColumnFamilyIterator(DecoratedKey key, ColumnFamily cf)
IDiskAtomFiltergetColumnFamilyIterator in interface IDiskAtomFilterpublic OnDiskAtomIterator getSSTableColumnIterator(SSTableReader sstable, DecoratedKey key)
IDiskAtomFiltergetSSTableColumnIterator in interface IDiskAtomFilterpublic OnDiskAtomIterator getSSTableColumnIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, RowIndexEntry indexEntry)
IDiskAtomFiltergetSSTableColumnIterator in interface IDiskAtomFilterfile - Already opened file data input, saves us opening another onekey - The key of the row we are about to iterate overpublic java.util.Comparator<Column> getColumnComparator(AbstractType<?> comparator)
getColumnComparator in interface IDiskAtomFilterpublic void collectReducedColumns(ColumnFamily container, java.util.Iterator<Column> reducedColumns, int gcBefore, long now)
IDiskAtomFiltercollectReducedColumns in interface IDiskAtomFilterprotected boolean respectTombstoneThresholds()
public int getLiveCount(ColumnFamily cf, long now)
getLiveCount in interface IDiskAtomFilterpublic ColumnCounter columnCounter(AbstractType<?> comparator, long now)
columnCounter in interface IDiskAtomFilterpublic void trim(ColumnFamily cf, int trimTo, long now)
public java.nio.ByteBuffer start()
public java.nio.ByteBuffer finish()
public void setStart(java.nio.ByteBuffer start)
public int lastCounted()
public int lastIgnored()
public int lastLive()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isReversed()
isReversed in interface IDiskAtomFilterpublic void updateColumnsLimit(int newLimit)
updateColumnsLimit in interface IDiskAtomFilterpublic boolean maySelectPrefix(java.util.Comparator<java.nio.ByteBuffer> cmp,
java.nio.ByteBuffer prefix)
maySelectPrefix in interface IDiskAtomFilterpublic boolean shouldInclude(SSTableReader sstable)
shouldInclude in interface IDiskAtomFilterCopyright © 2015 The Apache Software Foundation