public abstract class AbstractSimplePerColumnSecondaryIndex extends PerColumnSecondaryIndex
Modifier and Type | Field and Description |
---|---|
protected ColumnDefinition |
columnDef |
protected ColumnFamilyStore |
indexCfs |
baseCfs, columnDefs, CUSTOM_INDEX_OPTION_NAME, INDEX_KEYS_OPTION_NAME, INDEX_VALUES_OPTION_NAME, keyComparator, logger
Constructor and Description |
---|
AbstractSimplePerColumnSecondaryIndex() |
Modifier and Type | Method and Description |
---|---|
void |
delete(java.nio.ByteBuffer rowKey,
Cell cell,
OpOrder.Group opGroup)
Called when a column has been tombstoned or replaced.
|
void |
deleteForCleanup(java.nio.ByteBuffer rowKey,
Cell cell,
OpOrder.Group opGroup)
Called when a column has been removed due to a cleanup operation.
|
long |
estimateResultRows() |
java.lang.String |
expressionString(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
|
protected abstract java.nio.ByteBuffer |
getIndexedValue(java.nio.ByteBuffer rowKey,
Cell cell) |
protected AbstractType<?> |
getIndexKeyComparator() |
DecoratedKey |
getIndexKeyFor(java.nio.ByteBuffer value)
Returns the decoratedKey for a column value
|
java.lang.String |
getIndexName() |
void |
init()
Perform any initialization work
|
void |
insert(java.nio.ByteBuffer rowKey,
Cell cell,
OpOrder.Group opGroup)
insert a column to the index
|
void |
invalidate()
Remove the index and unregisters this index's mbean if one exists
|
protected abstract CellName |
makeIndexColumnName(java.nio.ByteBuffer rowKey,
Cell cell) |
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 |
truncateBlocking(long truncatedAt)
Truncate all the data from the current index
|
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) |
getNameForSystemKeyspace, validate
buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, getBaseCfs, getColumnDefs, getIndexComparator, indexes, indexes, isIndexBuilt, setIndexBuilt, setIndexRemoved, supportsOperator, toString, validateOptions
protected ColumnFamilyStore indexCfs
protected ColumnDefinition columnDef
public AbstractSimplePerColumnSecondaryIndex()
public void init()
SecondaryIndex
init
in class SecondaryIndex
protected AbstractType<?> getIndexKeyComparator()
public DecoratedKey getIndexKeyFor(java.nio.ByteBuffer value)
SecondaryIndex
getIndexKeyFor
in class SecondaryIndex
value
- column valueprotected abstract CellName makeIndexColumnName(java.nio.ByteBuffer rowKey, Cell cell)
protected abstract java.nio.ByteBuffer getIndexedValue(java.nio.ByteBuffer rowKey, Cell cell)
protected abstract AbstractType getExpressionComparator()
public java.lang.String expressionString(IndexExpression expr)
public void delete(java.nio.ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup)
PerColumnSecondaryIndex
delete
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedcell
- all the column infopublic void deleteForCleanup(java.nio.ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup)
PerColumnSecondaryIndex
deleteForCleanup
in class PerColumnSecondaryIndex
public void insert(java.nio.ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup)
PerColumnSecondaryIndex
insert
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedcell
- all the column infopublic void update(java.nio.ByteBuffer rowKey, Cell oldCol, Cell col, OpOrder.Group opGroup)
PerColumnSecondaryIndex
update
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedoldCol
- the previous column infocol
- 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 truncateBlocking(long truncatedAt)
SecondaryIndex
truncateBlocking
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 void reload()
SecondaryIndex
reload
in class SecondaryIndex
public long estimateResultRows()
estimateResultRows
in class SecondaryIndex
public boolean validate(java.nio.ByteBuffer rowKey, Cell cell)
validate
in class PerColumnSecondaryIndex
Copyright © 2015 The Apache Software Foundation