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, maybeIndex
baseKeyspace, baseTable, buildIndexAsync, buildIndexBlocking, createInstance, createSecondaryIndexSearcher, getBaseCfs, getColumnDefs, getIndexKeyFor, isIndexBuilt, newIndexMetadata, setIndexBuilt, setIndexRemoved, supportsOperator, validateOptions
protected ColumnFamilyStore indexCfs
protected ColumnDefinition columnDef
public AbstractSimplePerColumnSecondaryIndex()
public void init()
SecondaryIndex
init
in class SecondaryIndex
protected 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)
PerColumnSecondaryIndex
delete
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedpublic void deleteForCleanup(java.nio.ByteBuffer rowKey, Clustering clustering, Cell cell, OpOrder.Group opGroup, int nowInSec)
PerColumnSecondaryIndex
deleteForCleanup
in class PerColumnSecondaryIndex
public 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)
PerColumnSecondaryIndex
insert
in class PerColumnSecondaryIndex
rowKey
- 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)
PerColumnSecondaryIndex
update
in class PerColumnSecondaryIndex
rowKey
- the underlying row key which is indexedpublic boolean indexes(ColumnDefinition column)
SecondaryIndex
indexes
in class SecondaryIndex
public 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
protected ClusteringComparator getIndexComparator()
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 void validate(DecoratedKey partitionKey) throws InvalidRequestException
validate
in class SecondaryIndex
InvalidRequestException
public void validate(Clustering clustering) throws InvalidRequestException
validate
in class SecondaryIndex
InvalidRequestException
public void validate(java.nio.ByteBuffer cellValue, CellPath path) throws InvalidRequestException
validate
in class SecondaryIndex
InvalidRequestException
public java.lang.String toString()
toString
in class SecondaryIndex
Copyright © 2015 The Apache Software Foundation