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

org.apache.cassandra.db.index.composites

## Class CompositesIndex

- java.lang.Object
- - org.apache.cassandra.db.index.SecondaryIndex
  - - org.apache.cassandra.db.index.PerColumnSecondaryIndex
    - - org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex
      - - org.apache.cassandra.db.index.composites.CompositesIndex

- Direct Known Subclasses:
    CompositesIndexOnClusteringKey, CompositesIndexOnCollectionKey, CompositesIndexOnCollectionValue, CompositesIndexOnPartitionKey, CompositesIndexOnRegular

      public abstract class CompositesIndex
      extends AbstractSimplePerColumnSecondaryIndex

  Base class for secondary indexes where composites are involved.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompositesIndex.IndexedEntry`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex

      `columnDef, indexCfs`

    - ### Fields inherited from class org.apache.cassandra.db.index.SecondaryIndex

      `baseCfs, columnDefs, CUSTOM_INDEX_OPTION_NAME, keyComparator, logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositesIndex()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CompositesIndex` | `create(ColumnDefinition cfDef)`
    `SecondaryIndexSearcher` | `createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)` Called at query time Creates a implementation specific searcher instance for this index type
    `abstract CompositesIndex.IndexedEntry` | `decodeEntry(DecoratedKey indexedValue, Cell indexEntry)`
    `void` | `delete(CompositesIndex.IndexedEntry entry, OpOrder.Group opGroup)`
    `protected AbstractType<?>` | `getExpressionComparator()`
    `protected CellNameType` | `getIndexComparator()`
    `static CellNameType` | `getIndexComparator(CFMetaData baseMetadata, ColumnDefinition cfDef)`
    `abstract boolean` | `isStale(CompositesIndex.IndexedEntry entry, ColumnFamily data, long now)`
    `protected CellName` | `makeIndexColumnName(java.nio.ByteBuffer rowKey, Cell cell)`
    `protected abstract Composite` | `makeIndexColumnPrefix(java.nio.ByteBuffer rowKey, Composite columnName)`
    `void` | `validateOptions()` Validates the index_options passed in the ColumnDef

    - ### Methods inherited from class org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex

      `delete, estimateResultRows, expressionString, forceBlockingFlush, getIndexCfs, getIndexedValue, getIndexKeyComparator, getIndexKeyFor, getIndexName, init, insert, invalidate, reload, removeIndex, truncateBlocking, update`

    - ### Methods inherited from class org.apache.cassandra.db.index.PerColumnSecondaryIndex

      `getNameForSystemKeyspace, validate`

    - ### Methods inherited from class org.apache.cassandra.db.index.SecondaryIndex

      `buildIndexAsync, buildIndexBlocking, createInstance, getBaseCfs, getColumnDefs, indexes, isIndexBuilt, setIndexBuilt, setIndexRemoved`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompositesIndex

          public CompositesIndex()

  - ### Method Detail

    - #### getIndexComparator

          protected CellNameType getIndexComparator()

    - #### create

          public static CompositesIndex create(ColumnDefinition cfDef)

    - #### getIndexComparator

          public static CellNameType getIndexComparator(CFMetaData baseMetadata,
                                        ColumnDefinition cfDef)

    - #### makeIndexColumnName

          protected CellName makeIndexColumnName(java.nio.ByteBuffer rowKey,
                                     Cell cell)

      Specified by:
        `makeIndexColumnName` in class `AbstractSimplePerColumnSecondaryIndex`

    - #### makeIndexColumnPrefix

          protected abstract Composite makeIndexColumnPrefix(java.nio.ByteBuffer rowKey,
                                        Composite columnName)

    - #### decodeEntry

          public abstract CompositesIndex.IndexedEntry decodeEntry(DecoratedKey indexedValue,
                                                 Cell indexEntry)

    - #### isStale

          public abstract boolean isStale(CompositesIndex.IndexedEntry entry,
                        ColumnFamily data,
                        long now)

    - #### delete

          public void delete(CompositesIndex.IndexedEntry entry,
                    OpOrder.Group opGroup)

    - #### getExpressionComparator

          protected AbstractType<?> getExpressionComparator()

      Specified by:
        `getExpressionComparator` in class `AbstractSimplePerColumnSecondaryIndex`

    - #### createSecondaryIndexSearcher

          public SecondaryIndexSearcher createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)

      Description copied from class: `SecondaryIndex`
      Called at query time Creates a implementation specific searcher instance for this index type
      Specified by:
        `createSecondaryIndexSearcher` in class `SecondaryIndex`
      Parameters:
        `columns` - the list of columns which belong to this index type
      Returns:
        the secondary index search impl

    - #### validateOptions

          public void validateOptions()
                               throws ConfigurationException

      Description copied from class: `SecondaryIndex`
      Validates the index_options passed in the ColumnDef
      Specified by:
        `validateOptions` in class `SecondaryIndex`
      Throws:
        `ConfigurationException`

Copyright © 2014 The Apache Software Foundation