org.apache.cassandra.io.sstable
Class IndexHelper
java.lang.Object
org.apache.cassandra.io.sstable.IndexHelper
public class IndexHelper
- extends java.lang.Object
Provides helper to serialize, deserialize and use column indexes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexHelper
public IndexHelper()
skipBloomFilter
public static void skipBloomFilter(java.io.DataInput in)
throws java.io.IOException
- Throws:
java.io.IOException
skipIndex
public static void skipIndex(java.io.DataInput in)
throws java.io.IOException
- Skip the index
- Parameters:
in
- the data input from which the index should be skipped
- Throws:
java.io.IOException
- if an I/O error occurs.
deserializeIndex
public static java.util.List<IndexHelper.IndexInfo> deserializeIndex(FileDataInput in)
throws java.io.IOException
- Deserialize the index into a structure and return it
- Parameters:
in
- - input source
- Returns:
- ArrayList - list of de-serialized indexes
- Throws:
java.io.IOException
- if an I/O error occurs.
indexFor
public 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.
- Parameters:
name
- name of the indexindexList
- list of the indexInfo objectscomparator
- comparator typereversed
- is name reversed
- Returns:
- int index
getComparator
public static java.util.Comparator<IndexHelper.IndexInfo> getComparator(AbstractType<?> nameComparator,
boolean reversed)
Copyright © 2013 The Apache Software Foundation