Class CollectionKeyIndex
- java.lang.Object
-
- org.apache.cassandra.index.internal.CassandraIndex
-
- org.apache.cassandra.index.internal.composites.CollectionKeyIndexBase
-
- org.apache.cassandra.index.internal.composites.CollectionKeyIndex
-
- All Implemented Interfaces:
Index
public class CollectionKeyIndex extends CollectionKeyIndexBase
Index on the collection element of the cell name of a collection. The row keys for this index are given by the collection element for indexed columns.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.index.Index
Index.CollatedViewIndexBuildingSupport, Index.IndexBuildingSupport, Index.Indexer, Index.LoadType, Index.Searcher
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.index.internal.CassandraIndex
baseCfs, functions, indexCfs, indexedColumn, metadata
-
Fields inherited from interface org.apache.cassandra.index.Index
INDEX_BUILDER_SUPPORT
-
-
Constructor Summary
Constructors Constructor Description CollectionKeyIndex(ColumnFamilyStore baseCfs, IndexMetadata indexDef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffergetIndexedValue(java.nio.ByteBuffer partitionKey, Clustering<?> clustering, CellPath path, java.nio.ByteBuffer cellValue)Extract the value to be inserted into the index from the components of the base databooleanisStale(Row data, java.nio.ByteBuffer indexValue, int nowInSec)Check whether a value retrieved from an index is still valid by comparing it to current row from the base table.booleansupportsOperator(ColumnMetadata indexedColumn, Operator operator)Returns true if an index of this type can support search predicates of the form [column] OPERATOR [value]-
Methods inherited from class org.apache.cassandra.index.internal.composites.CollectionKeyIndexBase
buildIndexClusteringPrefix, decodeEntry
-
Methods inherited from class org.apache.cassandra.index.internal.CassandraIndex
customExpressionValueType, deleteStaleEntry, dependsOn, getBackingTable, getBlockingFlushTask, getEstimatedResultRows, getIndexCfs, getIndexComparator, getIndexedColumn, getIndexMetadata, getInitializationTask, getInvalidateTask, getMetadataReloadTask, getPostIndexQueryFilter, getTruncateTask, indexCfsMetadata, indexerFor, newIndex, postProcessorFor, register, searcherFor, shouldBuildBlocking, supportsExpression, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.index.Index
getBlockingFlushTask, getBuildTaskSupport, getFlushObserver, getPreJoinTask, getRecoveryTaskSupport, getSupportedLoadTypeOnFailure, notifyIndexerAboutRowsInFullyExpiredSSTables, supportsReplicaFilteringProtection
-
-
-
-
Constructor Detail
-
CollectionKeyIndex
public CollectionKeyIndex(ColumnFamilyStore baseCfs, IndexMetadata indexDef)
-
-
Method Detail
-
getIndexedValue
public java.nio.ByteBuffer getIndexedValue(java.nio.ByteBuffer partitionKey, Clustering<?> clustering, CellPath path, java.nio.ByteBuffer cellValue)Description copied from class:CassandraIndexExtract the value to be inserted into the index from the components of the base data- Specified by:
getIndexedValuein classCassandraIndex- Parameters:
partitionKey- from the primary dataclustering- from the primary datapath- from the primary datacellValue- from the primary data- Returns:
- a ByteBuffer containing the value to be inserted in the index. This will be used to make the partition key in the index table
-
isStale
public boolean isStale(Row data, java.nio.ByteBuffer indexValue, int nowInSec)
Description copied from class:CassandraIndexCheck whether a value retrieved from an index is still valid by comparing it to current row from the base table. Used at read time to identify out of date index entries so that they can be excluded from search results and repaired- Specified by:
isStalein classCassandraIndex- Parameters:
data- the current row from the primary data tableindexValue- the value we retrieved from the index- Returns:
- true if the index is out of date and the entry should be dropped
-
supportsOperator
public boolean supportsOperator(ColumnMetadata indexedColumn, Operator operator)
Description copied from class:CassandraIndexReturns true if an index of this type can support search predicates of the form [column] OPERATOR [value]- Overrides:
supportsOperatorin classCassandraIndex- Returns:
-
-