|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.index.SecondaryIndex
org.apache.cassandra.db.index.PerColumnSecondaryIndex
org.apache.cassandra.db.index.keys.KeysIndex
public class KeysIndex
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.SecondaryIndex |
---|
baseCfs, columnDefs, CUSTOM_INDEX_OPTION_NAME |
Constructor Summary | |
---|---|
KeysIndex()
|
Method Summary | |
---|---|
SecondaryIndexSearcher |
createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)
Called at query time Creates a implementation specific searcher instance for this index type |
void |
deleteColumn(DecoratedKey<?> valueKey,
java.nio.ByteBuffer rowKey,
IColumn column)
Delete a column from the index |
void |
forceBlockingFlush()
Forces this indexes in memory data to disk |
ColumnFamilyStore |
getIndexCfs()
Allow access to the underlying column family store if there is one |
java.lang.String |
getIndexName()
|
long |
getLiveSize()
Get current amount of memory this index is consuming (in bytes) |
static AbstractType |
indexComparator()
|
void |
init()
Perform any initialization work |
void |
insertColumn(DecoratedKey<?> valueKey,
java.nio.ByteBuffer rowKey,
IColumn column)
insert a column to the index |
void |
invalidate()
Remove the index and unregisters this index's mbean if one exists |
void |
removeIndex(java.nio.ByteBuffer columnName)
Delete all files and references to this index |
void |
truncate(long truncatedAt)
Truncate all the data from the current index |
void |
updateColumn(DecoratedKey<?> valueKey,
java.nio.ByteBuffer rowKey,
IColumn col)
update a column from the index |
void |
validateOptions()
Validates the index_options passed in the ColumnDef |
Methods inherited from class org.apache.cassandra.db.index.PerColumnSecondaryIndex |
---|
getNameForSystemTable |
Methods inherited from class org.apache.cassandra.db.index.SecondaryIndex |
---|
buildIndexAsync, buildIndexBlocking, createInstance, getBaseCfs, isIndexBuilt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeysIndex()
Method Detail |
---|
public void init()
SecondaryIndex
init
in class SecondaryIndex
public static AbstractType indexComparator()
public void deleteColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn column)
PerColumnSecondaryIndex
deleteColumn
in class PerColumnSecondaryIndex
valueKey
- the column value which is used as the index keyrowKey
- the underlying row key which is indexedcolumn
- all the column infopublic void insertColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn column)
PerColumnSecondaryIndex
insertColumn
in class PerColumnSecondaryIndex
valueKey
- the column value which is used as the index keyrowKey
- the underlying row key which is indexedcolumn
- all the column infopublic void updateColumn(DecoratedKey<?> valueKey, java.nio.ByteBuffer rowKey, IColumn col)
PerColumnSecondaryIndex
updateColumn
in class PerColumnSecondaryIndex
valueKey
- the column value which is used as the index keyrowKey
- the underlying row key which is indexedcol
- all the column infopublic void removeIndex(java.nio.ByteBuffer columnName) throws java.io.IOException
SecondaryIndex
removeIndex
in class SecondaryIndex
columnName
- the indexed column to remove
java.io.IOException
public void forceBlockingFlush() throws java.io.IOException
SecondaryIndex
forceBlockingFlush
in class SecondaryIndex
java.io.IOException
public void invalidate()
SecondaryIndex
invalidate
in class SecondaryIndex
public void truncate(long truncatedAt)
SecondaryIndex
truncate
in class SecondaryIndex
truncatedAt
- The truncation timestamp, all data before that timestamp should be rejected.public ColumnFamilyStore getIndexCfs()
SecondaryIndex
getIndexCfs
in class SecondaryIndex
public SecondaryIndexSearcher createSecondaryIndexSearcher(java.util.Set<java.nio.ByteBuffer> columns)
SecondaryIndex
createSecondaryIndexSearcher
in class SecondaryIndex
columns
- the list of columns which belong to this index type
public java.lang.String getIndexName()
getIndexName
in class SecondaryIndex
public void validateOptions() throws ConfigurationException
SecondaryIndex
validateOptions
in class SecondaryIndex
ConfigurationException
public long getLiveSize()
SecondaryIndex
getLiveSize
in class SecondaryIndex
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |