Class SingletonIndexGroup

java.lang.Object
org.apache.cassandra.index.SingletonIndexGroup
All Implemented Interfaces:
Index.Group
Direct Known Subclasses:
SASIIndexGroup

public class SingletonIndexGroup extends Object implements Index.Group
An Index.Group containing a single Index, to which it just delegates the calls.
  • Constructor Details

    • SingletonIndexGroup

      protected SingletonIndexGroup(Index delegate)
  • Method Details

    • getIndexes

      public Set<Index> getIndexes()
      Description copied from interface: Index.Group
      Returns the indexes that are members of this group.
      Specified by:
      getIndexes in interface Index.Group
      Returns:
      the indexes that are members of this group
    • getIndex

      public Index getIndex()
    • containsIndex

      public boolean containsIndex(Index index)
      Description copied from interface: Index.Group
      Returns if this group contains the specified Index.
      Specified by:
      containsIndex in interface Index.Group
      Parameters:
      index - the index to be removed
      Returns:
      true if this group contains index, false otherwise
    • indexerFor

      public Index.Indexer indexerFor(Predicate<Index> indexSelector, DecoratedKey key, RegularAndStaticColumns columns, long nowInSec, WriteContext ctx, IndexTransaction.Type transactionType, Memtable memtable)
      Description copied from interface: Index.Group
      Creates an new Indexer object for updates to a given partition.
      Specified by:
      indexerFor in interface Index.Group
      Parameters:
      indexSelector - a predicate selecting the targeted members
      key - key of the partition being modified
      columns - the regular and static columns the created indexer will have to deal with. This can be empty as an update might only contain partition, range and row deletions, but the indexer is guaranteed to not get any cells for a column that is not part of columns.
      nowInSec - current time of the update operation
      ctx - WriteContext spanning the update operation
      transactionType - indicates what kind of update is being performed on the base data i.e. a write time insert/update/delete or the result of compaction
      memtable - the Memtable to which the updates are being applied or null if the source of the updates is an existing SSTable
      Returns:
      the newly created indexer or null if the index is not interested by the update (this could be because the index doesn't care about that particular partition, doesn't care about that type of transaction, ...).
    • queryPlanFor

      public Index.QueryPlan queryPlanFor(RowFilter rowFilter)
      Description copied from interface: Index.Group
      Returns a new Index.QueryPlan for the specified RowFilter, or null if none of the indexes in this group supports the expression in the row filter.
      Specified by:
      queryPlanFor in interface Index.Group
      Parameters:
      rowFilter - a row filter
      Returns:
      a new query plan for the specified RowFilter if it's supported, null otherwise
    • getFlushObserver

      public SSTableFlushObserver getFlushObserver(Descriptor descriptor, LifecycleNewTracker tracker, TableMetadata tableMetadata)
      Description copied from interface: Index.Group
      Get flush observer to observe partition/cell events generated by flushing SSTable (memtable flush or compaction).
      Specified by:
      getFlushObserver in interface Index.Group
      Parameters:
      descriptor - The descriptor of the sstable observer is requested for.
      tracker - The LifecycleNewTracker associated with the SSTable being written
      tableMetadata - The immutable metadata of the table at the moment the SSTable is flushed
      Returns:
      SSTable flush observer.
    • getComponents

      public Set<Component> getComponents()
      Description copied from interface: Index.Group
      Returns the SSTable-attached Components created by this index group.
      Specified by:
      getComponents in interface Index.Group
      Returns:
      the SSTable components created by this group