Interface Indexing
public interface Indexing
Allows creation, destruction, and querying of the indexes available to a
Dataset
.-
Method Summary
Modifier and TypeMethodDescription<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.void
destroyIndex
(Index<?> index) Destroy an index.Collection<Index<?>>
Return the current set of indexes.Collection<Index<?>>
Return the current set of live indexes.
-
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 theFuture.get()
methods --get
throws anExecutionException
if the index creation failed. Thecause
from this exception indicates the reason for the failure. If the arguments tocreateIndex
prevent the index from being created, the cause is anIllegalArgumentException
; if the dataset state prevents the index from being created, the cause is anIllegalStateException
.- Type Parameters:
T
- JDK type of the cells to be indexed- Parameters:
cellDefinition
- definition of the cells to indexsettings
- index type definition- Returns:
- an
Operation
representing the creation of the index
-
destroyIndex
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
-