|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.io.sstable.IndexHelper
public class IndexHelper
Provides helper to serialize, deserialize and use column indexes.
| Nested Class Summary | |
|---|---|
static class |
IndexHelper.IndexInfo
|
| Constructor Summary | |
|---|---|
IndexHelper()
|
|
| Method Summary | |
|---|---|
static IFilter |
defreezeBloomFilter(FileDataInput file,
FilterFactory.Type type)
|
static IFilter |
defreezeBloomFilter(FileDataInput file,
long maxSize,
FilterFactory.Type type)
De-freeze the bloom filter. |
static java.util.List<IndexHelper.IndexInfo> |
deserializeIndex(FileDataInput in)
Deserialize the index into a structure and return it |
static java.util.Comparator<IndexHelper.IndexInfo> |
getComparator(AbstractType<?> nameComparator,
boolean reversed)
|
static int |
indexFor(java.nio.ByteBuffer name,
java.util.List<IndexHelper.IndexInfo> indexList,
AbstractType<?> comparator,
boolean reversed,
int lastIndex)
The index of the IndexInfo in which a scan starting with @name should begin. |
static void |
skipBloomFilter(java.io.DataInput in)
Skip the bloom filter |
static void |
skipIndex(java.io.DataInput in)
Skip the index |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IndexHelper()
| Method Detail |
|---|
public static void skipBloomFilter(java.io.DataInput in)
throws java.io.IOException
in - the data input from which the bloom filter should be skipped
java.io.IOException
public static void skipIndex(java.io.DataInput in)
throws java.io.IOException
in - the data input from which the index should be skipped
java.io.IOException - if an I/O error occurs.
public static java.util.List<IndexHelper.IndexInfo> deserializeIndex(FileDataInput in)
throws java.io.IOException
in - - input source
java.io.IOException - if an I/O error occurs.
public static IFilter defreezeBloomFilter(FileDataInput file,
FilterFactory.Type type)
throws java.io.IOException
java.io.IOException
public static IFilter defreezeBloomFilter(FileDataInput file,
long maxSize,
FilterFactory.Type type)
throws java.io.IOException
file - - source filemaxSize - - sanity check: if filter claimes to be larger than this it is bogustype - - Bloom Filter type.
java.io.IOException - if an I/O error occurs.
Guarantees that file's current position will be just after the bloom filter, even if
the filter cannot be deserialized, UNLESS EOFException is thrown.
public static int indexFor(java.nio.ByteBuffer name,
java.util.List<IndexHelper.IndexInfo> indexList,
AbstractType<?> comparator,
boolean reversed,
int lastIndex)
name - name of the indexindexList - list of the indexInfo objectscomparator - comparator typereversed - is name reversed
public static java.util.Comparator<IndexHelper.IndexInfo> getComparator(AbstractType<?> nameComparator,
boolean reversed)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||