org.apache.cassandra.db.index
Class PerColumnSecondaryIndex

java.lang.Object
  extended by org.apache.cassandra.db.index.SecondaryIndex
      extended by org.apache.cassandra.db.index.PerColumnSecondaryIndex
Direct Known Subclasses:
KeysIndex

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
 
Constructor Summary
PerColumnSecondaryIndex()
           
 
Method Summary
abstract  void deleteColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn col)
          Delete a column from the index
 java.lang.String getNameForSystemTable(java.nio.ByteBuffer column)
          Return the unique name for this index and column to be stored in the SystemTable that tracks if each column is built
abstract  void insertColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn col)
          insert a column to the index
abstract  void updateColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn col)
          update a column from the index
 
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
 

Constructor Detail

PerColumnSecondaryIndex

public PerColumnSecondaryIndex()
Method Detail

deleteColumn

public abstract void deleteColumn(DecoratedKey<?> valueKey,
                                  java.nio.ByteBuffer rowKey,
                                  IColumn col)
                           throws java.io.IOException
Delete a column from the index

Parameters:
valueKey - the column value which is used as the index key
rowKey - the underlying row key which is indexed
col - all the column info
Throws:
java.io.IOException

insertColumn

public abstract void insertColumn(DecoratedKey<?> valueKey,
                                  java.nio.ByteBuffer rowKey,
                                  IColumn col)
                           throws java.io.IOException
insert a column to the index

Parameters:
valueKey - the column value which is used as the index key
rowKey - the underlying row key which is indexed
col - all the column info
Throws:
java.io.IOException

updateColumn

public abstract void updateColumn(DecoratedKey<?> valueKey,
                                  java.nio.ByteBuffer rowKey,
                                  IColumn col)
                           throws java.io.IOException
update a column from the index

Parameters:
valueKey - the column value which is used as the index key
rowKey - the underlying row key which is indexed
col - all the column info
Throws:
java.io.IOException

getNameForSystemTable

public java.lang.String getNameForSystemTable(java.nio.ByteBuffer column)
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:
column - the name of the column
Returns:
the unique name


Copyright © 2011 The Apache Software Foundation