org.apache.cassandra.db.index.composites

## Class CompositesIndexIncludingCollectionKey

- 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
        - - org.apache.cassandra.db.index.composites.CompositesIndexIncludingCollectionKey

- Direct Known Subclasses:
    CompositesIndexOnCollectionKey, CompositesIndexOnCollectionKeyAndValue

      public abstract class CompositesIndexIncludingCollectionKey
      extends CompositesIndex

  Common superclass for indexes that capture collection keys, including indexes on such keys themselves. A cell indexed by this index will have the general form: ck_0 ... ck_n c_name [col_elt] : v where ck_i are the cluster keys, c_name the CQL3 column name, col_elt the collection element that we want to index (which may or may not be there depending on whether c_name is the collection we're indexing), and v the cell value. Such a cell is indexed if c_name is the indexed collection (in which case we are guaranteed to have col_elt). The index entry can be viewed in the following way: - the row key is determined by subclasses of this type. - the cell name will be 'rk ck_0 ... ck_n' where rk is the row key of the initial cell.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.db.index.composites.CompositesIndex

      `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, INDEX_ENTRIES_OPTION_NAME, INDEX_KEYS_OPTION_NAME, INDEX_VALUES_OPTION_NAME, keyComparator, logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositesIndexIncludingCollectionKey()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CellNameType` | `buildIndexComparator(CFMetaData baseMetadata, ColumnDefinition columnDef)`
    `CompositesIndex.IndexedEntry` | `decodeEntry(DecoratedKey indexedValue, Cell indexEntry)`
    `boolean` | `indexes(CellName name)` Returns true if the provided cell name is indexed by this secondary index.
    `protected Composite` | `makeIndexColumnPrefix(java.nio.ByteBuffer rowKey, Composite cellName)`

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

      `create, createSecondaryIndexSearcher, delete, getExpressionComparator, getIndexComparator, getIndexComparator, isStale, makeIndexColumnName, validateOptions`

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

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

    - ### 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, getIndexKeyFor, indexes, isIndexBuilt, isQueryable, setIndexBuilt, setIndexRemoved, supportsOperator, toString`

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

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

- - ### Constructor Detail

    - #### CompositesIndexIncludingCollectionKey

          public CompositesIndexIncludingCollectionKey()

  - ### Method Detail

    - #### buildIndexComparator

          public static CellNameType buildIndexComparator(CFMetaData baseMetadata,
                                                          ColumnDefinition columnDef)

    - #### makeIndexColumnPrefix

          protected Composite makeIndexColumnPrefix(java.nio.ByteBuffer rowKey,
                                                    Composite cellName)

      Specified by:
        `makeIndexColumnPrefix` in class `CompositesIndex`

    - #### decodeEntry

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

      Specified by:
        `decodeEntry` in class `CompositesIndex`

    - #### indexes

          public boolean indexes(CellName name)

      Description copied from class: `SecondaryIndex`
      Returns true if the provided cell name is indexed by this secondary index. The default implementation checks whether the name is one the columnDef name, but this should be overriden but subclass if needed.
      Specified by:
        `indexes` in class `SecondaryIndex`

Copyright © 2018 The Apache Software Foundation