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_ENTRIES_OPTION_NAME, INDEX_KEYS_OPTION_NAME, INDEX_VALUES_OPTION_NAME, keyComparator, logger| Constructor and Description |
|---|
AbstractSimplePerColumnSecondaryIndex() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract CBuilder |
buildIndexClusteringPrefix(java.nio.ByteBuffer rowKey,
ClusteringPrefix prefix,
CellPath path) |
void |
delete(java.nio.ByteBuffer rowKey,
Clustering clustering,
java.nio.ByteBuffer cellValue,
CellPath path,
DeletionTime deletion,
OpOrder.Group opGroup) |
void |
delete(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
Called when a column has been tombstoned or replaced.
|
void |
deleteForCleanup(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
Called when a column has been removed due to a cleanup operation.
|
long |
estimateResultRows() |
void |
forceBlockingFlush()
Forces this indexes' in memory data to disk
|
ColumnFamilyStore |
getIndexCfs()
Allow access to the underlying column family store if there is one
|
protected ClusteringComparator |
getIndexComparator() |
protected abstract java.nio.ByteBuffer |
getIndexedValue(java.nio.ByteBuffer rowKey,
Clustering clustering,
java.nio.ByteBuffer cellValue,
CellPath cellPath) |
protected java.nio.ByteBuffer |
getIndexedValue(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell) |
protected AbstractType<?> |
getIndexKeyComparator() |
java.lang.String |
getIndexName() |
ColumnDefinition |
indexedColumn() |
boolean |
indexes(ColumnDefinition column)
Returns true if the provided column is indexed by this secondary index.
|
void |
init()
Perform any initialization work
|
void |
insert(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
LivenessInfo info,
OpOrder.Group opGroup) |
void |
insert(java.nio.ByteBuffer rowKey,
Clustering clustering,
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 Slice.Bound |
makeIndexBound(java.nio.ByteBuffer rowKey,
Slice.Bound bound) |
protected Clustering |
makeIndexClustering(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell) |
protected Clustering |
makeIndexClustering(java.nio.ByteBuffer rowKey,
Clustering clustering,
CellPath path) |
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
|
java.lang.String |
toString() |
void |
truncateBlocking(long truncatedAt)
Truncate all the data from the current index
|
void |
update(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell oldCell,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
update a column from the index
|
void |
validate(java.nio.ByteBuffer cellValue,
CellPath path) |
void |
validate(Clustering clustering) |
void |
validate(DecoratedKey partitionKey) |
getNameForSystemKeyspace, indexPrimaryKeyColumn, indexRow, maybeDelete, maybeIndexbaseKeyspace, baseTable, buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, getBaseCfs, getColumnDefs, getIndexKeyFor, isIndexBuilt, newIndexMetadata, setIndexBuilt, setIndexRemoved, supportsOperator, validateOptionsprotected ColumnFamilyStore indexCfs
protected ColumnDefinition columnDef
public AbstractSimplePerColumnSecondaryIndex()
public void init()
SecondaryIndexinit in class SecondaryIndexprotected AbstractType<?> getIndexKeyComparator()
public ColumnDefinition indexedColumn()
protected Clustering makeIndexClustering(java.nio.ByteBuffer rowKey, Clustering clustering, Cell cell)
protected Clustering makeIndexClustering(java.nio.ByteBuffer rowKey, Clustering clustering, CellPath path)
protected Slice.Bound makeIndexBound(java.nio.ByteBuffer rowKey, Slice.Bound bound)
protected abstract CBuilder buildIndexClusteringPrefix(java.nio.ByteBuffer rowKey, ClusteringPrefix prefix, CellPath path)
protected java.nio.ByteBuffer getIndexedValue(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell)
protected abstract java.nio.ByteBuffer getIndexedValue(java.nio.ByteBuffer rowKey,
Clustering clustering,
java.nio.ByteBuffer cellValue,
CellPath cellPath)
public void delete(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
PerColumnSecondaryIndexdelete in class PerColumnSecondaryIndexrowKey - the underlying row key which is indexedpublic void deleteForCleanup(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
PerColumnSecondaryIndexdeleteForCleanup in class PerColumnSecondaryIndexpublic void delete(java.nio.ByteBuffer rowKey,
Clustering clustering,
java.nio.ByteBuffer cellValue,
CellPath path,
DeletionTime deletion,
OpOrder.Group opGroup)
public void insert(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
OpOrder.Group opGroup)
PerColumnSecondaryIndexinsert in class PerColumnSecondaryIndexrowKey - the underlying row key which is indexedpublic void insert(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell cell,
LivenessInfo info,
OpOrder.Group opGroup)
public void update(java.nio.ByteBuffer rowKey,
Clustering clustering,
Cell oldCell,
Cell cell,
OpOrder.Group opGroup,
int nowInSec)
PerColumnSecondaryIndexupdate in class PerColumnSecondaryIndexrowKey - the underlying row key which is indexedpublic boolean indexes(ColumnDefinition column)
SecondaryIndexindexes in class SecondaryIndexpublic void removeIndex(java.nio.ByteBuffer columnName)
SecondaryIndexremoveIndex in class SecondaryIndexcolumnName - the indexed column to removepublic void forceBlockingFlush()
SecondaryIndexforceBlockingFlush in class SecondaryIndexpublic void invalidate()
SecondaryIndexinvalidate in class SecondaryIndexpublic void truncateBlocking(long truncatedAt)
SecondaryIndextruncateBlocking in class SecondaryIndextruncatedAt - The truncation timestamp, all data before that timestamp should be rejected.public ColumnFamilyStore getIndexCfs()
SecondaryIndexgetIndexCfs in class SecondaryIndexprotected ClusteringComparator getIndexComparator()
public java.lang.String getIndexName()
getIndexName in class SecondaryIndexpublic void reload()
SecondaryIndexreload in class SecondaryIndexpublic long estimateResultRows()
estimateResultRows in class SecondaryIndexpublic void validate(DecoratedKey partitionKey) throws InvalidRequestException
validate in class SecondaryIndexInvalidRequestExceptionpublic void validate(Clustering clustering) throws InvalidRequestException
validate in class SecondaryIndexInvalidRequestExceptionpublic void validate(java.nio.ByteBuffer cellValue,
CellPath path)
throws InvalidRequestException
validate in class SecondaryIndexInvalidRequestExceptionpublic java.lang.String toString()
toString in class SecondaryIndexCopyright © 2015 The Apache Software Foundation