PerColumnSecondaryIndex (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db.index

## Class PerColumnSecondaryIndex

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

- Direct Known Subclasses:
    AbstractSimplePerColumnSecondaryIndex

      public abstract class PerColumnSecondaryIndex
      extends SecondaryIndex

  Base class for Secondary indexes that implement a unique index per column

- - ### Field Summary

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `delete(java.nio.ByteBuffer rowKey, Cell col, OpOrder.Group opGroup)` Called when a column has been tombstoned or replaced.
    `abstract void` | `deleteForCleanup(java.nio.ByteBuffer rowKey, Cell col, OpOrder.Group opGroup)` Called when a column has been removed due to a cleanup operation.
    `java.lang.String` | `getNameForSystemKeyspace(java.nio.ByteBuffer column)` Return the unique name for this index and column to be stored in the SystemKeyspace that tracks if each column is built
    `abstract void` | `insert(java.nio.ByteBuffer rowKey, Cell col, OpOrder.Group opGroup)` insert a column to the index
    `abstract void` | `update(java.nio.ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup)` update a column from the index
    `boolean` | `validate(java.nio.ByteBuffer rowKey, Cell cell)`
    `boolean` | `validate(Cell cell)`

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

      `buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, estimateResultRows, forceBlockingFlush, getBaseCfs, getColumnDefs, getIndexCfs, getIndexComparator, getIndexKeyFor, getIndexName, indexes, indexes, init, invalidate, isIndexBuilt, isQueryable, reload, removeIndex, setIndexBuilt, setIndexRemoved, supportsOperator, toString, truncateBlocking, validateOptions`

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

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

- - ### Constructor Detail

    - #### PerColumnSecondaryIndex

          public PerColumnSecondaryIndex()

  - ### Method Detail

    - #### delete

          public abstract void delete(java.nio.ByteBuffer rowKey,
                                      Cell col,
                                      OpOrder.Group opGroup)

      Called when a column has been tombstoned or replaced.
      Parameters:
        `rowKey` - the underlying row key which is indexed
        `col` - all the column info

    - #### deleteForCleanup

          public abstract void deleteForCleanup(java.nio.ByteBuffer rowKey,
                                                Cell col,
                                                OpOrder.Group opGroup)

      Called when a column has been removed due to a cleanup operation.

    - #### insert

          public abstract void insert(java.nio.ByteBuffer rowKey,
                                      Cell col,
                                      OpOrder.Group opGroup)

      insert a column to the index
      Parameters:
        `rowKey` - the underlying row key which is indexed
        `col` - all the column info

    - #### update

          public abstract void update(java.nio.ByteBuffer rowKey,
                                      Cell oldCol,
                                      Cell col,
                                      OpOrder.Group opGroup)

      update a column from the index
      Parameters:
        `rowKey` - the underlying row key which is indexed
        `oldCol` - the previous column info
        `col` - all the column info

    - #### getNameForSystemKeyspace

          public java.lang.String getNameForSystemKeyspace(java.nio.ByteBuffer column)

      Description copied from class: `SecondaryIndex`
      Return the unique name for this index and column to be stored in the SystemKeyspace that tracks if each column is built
      Specified by:
        `getNameForSystemKeyspace` in class `SecondaryIndex`
      Parameters:
        `column` - the name of the column
      Returns:
        the unique name

    - #### validate

          public boolean validate(java.nio.ByteBuffer rowKey,
                                  Cell cell)

      Specified by:
        `validate` in class `SecondaryIndex`

    - #### validate

          public boolean validate(Cell cell)

Copyright © 2018 The Apache Software Foundation