Interface IndexRegistry

  • All Known Implementing Classes:
    SecondaryIndexManager

    public interface IndexRegistry
    The collection of all Index instances for a base table. The SecondaryIndexManager for a ColumnFamilyStore contains an IndexRegistry (actually it implements this interface at present) and Index implementations register in order to: i) subscribe to the stream of updates being applied to partitions in the base table ii) provide searchers to support queries with the relevant search predicates
    • Field Detail

      • NON_DAEMON

        static final IndexRegistry NON_DAEMON
        An IndexRegistry intended for use when Cassandra is initialized in client or tool mode. Contains a single stub Index which possesses no actual indexing or searching capabilities but enables query validation and preparation to succeed. Useful for tools which need to prepare CQL statements without instantiating the whole ColumnFamilyStore infrastructure.
    • Method Detail

      • registerIndex

        default void registerIndex​(Index index)
      • listIndexGroups

        java.util.Collection<Index.Group> listIndexGroups()
      • listIndexes

        java.util.Collection<Index> listIndexes()
      • validate

        void validate​(PartitionUpdate update,
                      ClientState state)
        Called at write time to ensure that values present in the update are valid according to the rules of all registered indexes which will process it. The partition key as well as the clustering and cell values for each row in the update may be checked by index implementations
        Parameters:
        update - PartitionUpdate containing the values to be validated by registered Index implementations
        state - state related to the client connection
      • obtain

        static IndexRegistry obtain​(TableMetadata table)
        Returns the IndexRegistry associated to the specified table.
        Parameters:
        table - the table metadata
        Returns:
        the IndexRegistry associated to the specified table