Interface Indexing


public interface Indexing
Allows creation, destruction, and querying of the indexes available to a Dataset.
  • Method Details

    • createIndex

      <T extends Comparable<T>> Operation<Index<T>> createIndex(CellDefinition<T> cellDefinition, IndexSettings settings)
      Trigger creation of a new index using the given settings over cells of the given definition.

      The returned Operation completes normally when the index becomes live, and is available for use by the system. Exceptional completion is observed through the Future.get() methods -- get throws an ExecutionException if the index creation failed. The cause from this exception indicates the reason for the failure. If the arguments to createIndex prevent the index from being created, the cause is an IllegalArgumentException; if the dataset state prevents the index from being created, the cause is an IllegalStateException.

      Type Parameters:
      T - JDK type of the cells to be indexed
      Parameters:
      cellDefinition - definition of the cells to index
      settings - index type definition
      Returns:
      an Operation representing the creation of the index
    • destroyIndex

      void destroyIndex(Index<?> index) throws StoreIndexNotFoundException
      Destroy an index.
      Parameters:
      index - index to destroy
      Throws:
      StoreIndexNotFoundException - if the index does not exist
    • getLiveIndexes

      Collection<Index<?>> getLiveIndexes()
      Return the current set of live indexes.

      Indexes that have been created, but are not yet live will not be returned.

      Returns:
      the set of live indexes
    • getAllIndexes

      Collection<Index<?>> getAllIndexes()
      Return the current set of indexes.
      Returns:
      the set of all indexes