org.apache.cassandra.db.index
Class PerRowSecondaryIndex
java.lang.Object
org.apache.cassandra.db.index.SecondaryIndex
org.apache.cassandra.db.index.PerRowSecondaryIndex
public abstract class PerRowSecondaryIndex
- extends SecondaryIndex
Base class for Secondary indexes that implement a unique index per row
Method Summary |
abstract void |
applyIndexUpdates(java.nio.ByteBuffer rowKey,
ColumnFamily cf,
java.util.SortedSet<java.nio.ByteBuffer> mutatedIndexedColumns,
ColumnFamily oldIndexedColumns)
Removes obsolete index entries and creates new ones for the given row key
and mutated columns. |
abstract void |
deleteFromIndex(DecoratedKey<?> key,
java.util.List<IColumn> indexedColumnsInRow)
cleans up deleted columns from cassandra cleanup compaction |
java.lang.String |
getNameForSystemTable(java.nio.ByteBuffer columnName)
Return the unique name for this index and column
to be stored in the SystemTable that tracks if each column is built |
Methods inherited from class org.apache.cassandra.db.index.SecondaryIndex |
buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, forceBlockingFlush, getBaseCFStore, getIndexName, getUnderlyingCfs, init, isIndexBuilt, removeIndex, renameIndex, unregisterMbean, validateOptions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PerRowSecondaryIndex
public PerRowSecondaryIndex()
applyIndexUpdates
public abstract void applyIndexUpdates(java.nio.ByteBuffer rowKey,
ColumnFamily cf,
java.util.SortedSet<java.nio.ByteBuffer> mutatedIndexedColumns,
ColumnFamily oldIndexedColumns)
throws java.io.IOException
- Removes obsolete index entries and creates new ones for the given row key
and mutated columns.
- Parameters:
rowKey
- the row keycf
- the current rows datamutatedIndexedColumns
- the set of columns that were changed or addedoldIndexedColumns
- the columns which were deleted
- Throws:
java.io.IOException
deleteFromIndex
public abstract void deleteFromIndex(DecoratedKey<?> key,
java.util.List<IColumn> indexedColumnsInRow)
- cleans up deleted columns from cassandra cleanup compaction
- Parameters:
key
- indexedColumnsInRow
-
getNameForSystemTable
public java.lang.String getNameForSystemTable(java.nio.ByteBuffer columnName)
- Description copied from class:
SecondaryIndex
- Return the unique name for this index and column
to be stored in the SystemTable that tracks if each column is built
- Specified by:
getNameForSystemTable
in class SecondaryIndex
- Parameters:
columnName
- the name of the column
- Returns:
- the unique name
Copyright © 2011 The Apache Software Foundation