org.apache.cassandra.db.index.keys

## Class KeysIndex

- 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.keys.KeysIndex

    public class KeysIndex
    extends AbstractSimplePerColumnSecondaryIndex

Implements a secondary index for a column family using a second column family in which the row keys are indexed values, and column names are base row keys.

### 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
`KeysIndex()`

### Method Summary

Methods
`SecondaryIndexSearcher` `createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)` Called at query time Creates a implementation specific searcher instance for this index type
`protected AbstractType` `getExpressionComparator()`
`protected java.nio.ByteBuffer` `getIndexedValue(java.nio.ByteBuffer rowKey, Column column)`
`boolean` `isIndexEntryStale(java.nio.ByteBuffer indexedValue, ColumnFamily data, long now)`
`protected java.nio.ByteBuffer` `makeIndexColumnName(java.nio.ByteBuffer rowKey, Column column)`
`void` `validateOptions()` Validates the index_options passed in the ColumnDef

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

`delete, expressionString, forceBlockingFlush, getIndexCfs, getIndexName, getLiveSize, 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, getIndexComparator, getIndexKeyFor, indexes, isIndexBuilt, setIndexBuilt, setIndexRemoved`

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

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

### Constructor Detail

#### KeysIndex

    public KeysIndex()

### Method Detail

#### getIndexedValue

    protected java.nio.ByteBuffer getIndexedValue(java.nio.ByteBuffer rowKey,
                                      Column column)

Specified by:
  `getIndexedValue` in class `AbstractSimplePerColumnSecondaryIndex`

#### makeIndexColumnName

    protected java.nio.ByteBuffer makeIndexColumnName(java.nio.ByteBuffer rowKey,
                                          Column column)

Specified by:
  `makeIndexColumnName` 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

#### isIndexEntryStale

    public boolean isIndexEntryStale(java.nio.ByteBuffer indexedValue,
                            ColumnFamily data,
                            long now)

#### 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`

#### getExpressionComparator

    protected AbstractType getExpressionComparator()

Specified by:
  `getExpressionComparator` in class `AbstractSimplePerColumnSecondaryIndex`