IndexHelper (apache-cassandra API)
Date: 2014-10-21

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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IndexHelper.IndexInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexHelper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<IndexHelper.IndexInfo>` | `deserializeIndex(FileDataInput in, CType type)` Deserialize the index into a structure and return it
    `static java.util.Comparator<IndexHelper.IndexInfo>` | `getComparator(CType nameComparator, boolean reversed)`
    `static int` | `indexFor(Composite name, java.util.List<IndexHelper.IndexInfo> indexList, CType 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)`
    `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

    - #### IndexHelper

          public IndexHelper()

  - ### Method Detail

    - #### 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,
                                                               CType type)
                                                                        throws java.io.IOException

      Deserialize the index into a structure and return it
      Parameters:
        `in` - input source
        `type` - the comparator type for the column family
      Returns:
        ArrayList - list of de-serialized indexes
      Throws:
        `java.io.IOException` - if an I/O error occurs.

    - #### indexFor

          public static int indexFor(Composite name,
                     java.util.List<IndexHelper.IndexInfo> indexList,
                     CType comparator,
                     boolean reversed,
                     int lastIndex)

      The index of the IndexInfo in which a scan starting with @name should begin.
      Parameters:
        `name` - name of the index
        `indexList` - list of the indexInfo objects
        `comparator` - comparator type
        `reversed` - is name reversed
      Returns:
        int index

    - #### getComparator

          public static java.util.Comparator<IndexHelper.IndexInfo> getComparator(CType nameComparator,
                                                                  boolean reversed)

Copyright © 2014 The Apache Software Foundation