public abstract class AbstractSimplePerColumnSecondaryIndex extends PerColumnSecondaryIndex
baseCfs, columnDefs, CUSTOM_INDEX_OPTION_NAME, logger
Constructor and Description |
---|
AbstractSimplePerColumnSecondaryIndex() |
Modifier and Type | Method and Description |
---|---|
void |
delete(java.nio.ByteBuffer rowKey,
IColumn column)
Delete a column from the index
|
java.lang.String |
expressionString(org.apache.cassandra.thrift.IndexExpression expr) |
void |
forceBlockingFlush()
Forces this indexes in memory data to disk
|
protected abstract AbstractType |
getExpressionComparator() |
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)
|
void |
init()
Perform any initialization work
|
protected abstract void |
init(ColumnDefinition columnDef) |
void |
insert(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
|
protected abstract java.nio.ByteBuffer |
makeIndexColumnName(java.nio.ByteBuffer rowKey,
IColumn column) |
void |
reload()
Reload an existing index following a change to its configuration,
or that of the indexed column(s).
|
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 |
update(java.nio.ByteBuffer rowKey,
IColumn col)
update a column from the index
|
getNameForSystemTable, validate
buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, getBaseCfs, getColumnDefs, getIndexComparator, getIndexKeyFor, indexes, isIndexBuilt, setIndexBuilt, setIndexRemoved, validateOptions
public AbstractSimplePerColumnSecondaryIndex()
public void init()
SecondaryIndex
init
in class SecondaryIndex
protected abstract void init(ColumnDefinition columnDef)
protected abstract java.nio.ByteBuffer makeIndexColumnName(java.nio.ByteBuffer rowKey, IColumn column)
protected abstract AbstractType getExpressionComparator()
public java.lang.String expressionString(org.apache.cassandra.thrift.IndexExpression expr)
public void delete(java.nio.ByteBuffer rowKey, IColumn column)
PerColumnSecondaryIndex
delete
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedcolumn
- all the column infopublic void insert(java.nio.ByteBuffer rowKey, IColumn column)
PerColumnSecondaryIndex
insert
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedcolumn
- all the column infopublic void update(java.nio.ByteBuffer rowKey, IColumn col)
PerColumnSecondaryIndex
update
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedcol
- all the column infopublic void removeIndex(java.nio.ByteBuffer columnName)
SecondaryIndex
removeIndex
in class SecondaryIndex
columnName
- the indexed column to removepublic void forceBlockingFlush()
SecondaryIndex
forceBlockingFlush
in class SecondaryIndex
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 java.lang.String getIndexName()
getIndexName
in class SecondaryIndex
public long getLiveSize()
SecondaryIndex
getLiveSize
in class SecondaryIndex
public void reload()
SecondaryIndex
reload
in class SecondaryIndex
Copyright © 2013 The Apache Software Foundation