Module org.elasticsearch.server
Interface IndexAbstraction
- All Known Implementing Classes:
DataStream,IndexAbstraction.Alias,IndexAbstraction.ConcreteIndex
public interface IndexAbstraction
An index abstraction is a reference to one or more concrete indices.
An index abstraction has a unique name and encapsulates all the
Index instances it is pointing to.
Also depending on type it may refer to a single or many concrete indices and may or may not have a write index.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classRepresents an alias and groups allIndexMetadatainstances sharing the same alias name together.static classRepresents an concrete index and encapsulates itsIndexMetadatastatic enumAn index abstraction type. -
Method Summary
Modifier and TypeMethodDescriptiongetFailureIndices(Metadata metadata) It retrieves the failure indices of an index abstraction given it supports the failure store.getName()getType()default IndexgetWriteFailureIndex(Metadata metadata) A write failure index is a dedicated concrete index, that accepts all the new documents that belong to the failure store of an index abstraction.A write index is a dedicated concrete index, that accepts all the new documents that belong to an index abstraction.default IndexgetWriteIndex(IndexRequest request, Metadata metadata) default booleanbooleanisHidden()booleanisSystem()
-
Method Details
-
getType
IndexAbstraction.Type getType()- Returns:
- the type of the index abstraction
-
getName
String getName()- Returns:
- the name of the index abstraction
-
getIndices
- Returns:
- All
Indexof all concrete indices this index abstraction is referring to.
-
getFailureIndices
It retrieves the failure indices of an index abstraction given it supports the failure store.- Parameters:
metadata- certain abstractions require the matadata to lazily retrieve the failure indices.- Returns:
- All concrete failure indices this index abstraction is referring to. If the failure store is not supported, it returns an empty list.
-
getWriteIndex
A write index is a dedicated concrete index, that accepts all the new documents that belong to an index abstraction.A write index may also be a regular concrete index of a index abstraction and may therefore also be returned by
getIndices(). An index abstraction may also not have a dedicated write index.- Returns:
- the write index of this index abstraction or
nullif this index abstraction doesn't have a write index.
-
getWriteFailureIndex
A write failure index is a dedicated concrete index, that accepts all the new documents that belong to the failure store of an index abstraction. Only an index abstraction with trueisDataStreamRelated()supports a failure store.- Parameters:
metadata- certain index abstraction require the metadata to lazily retrieve the failure indices- Returns:
- the write failure index of this index abstraction or
nullif this index abstraction doesn't have a write failure index or it does not support the failure store.
-
getWriteIndex
-
getParentDataStream
- Returns:
- the data stream to which this index belongs or
nullif this is not a concrete index or if it is a concrete index that does not belong to a data stream.
-
isHidden
boolean isHidden()- Returns:
- whether this index abstraction is hidden or not
-
isSystem
boolean isSystem()- Returns:
- whether this index abstraction should be treated as a system index or not
-
isDataStreamRelated
default boolean isDataStreamRelated()- Returns:
- whether this index abstraction is related to data streams
-