Class IndexAbstraction.Alias

java.lang.Object
org.elasticsearch.cluster.metadata.IndexAbstraction.Alias
All Implemented Interfaces:
IndexAbstraction
Enclosing interface:
IndexAbstraction

public static class IndexAbstraction.Alias extends Object implements IndexAbstraction
Represents an alias and groups all IndexMetadata instances sharing the same alias name together.
  • Constructor Details

  • Method Details

    • getType

      public IndexAbstraction.Type getType()
      Specified by:
      getType in interface IndexAbstraction
      Returns:
      the type of the index abstraction
    • getName

      public String getName()
      Specified by:
      getName in interface IndexAbstraction
      Returns:
      the name of the index abstraction
    • getIndices

      public List<Index> getIndices()
      Specified by:
      getIndices in interface IndexAbstraction
      Returns:
      All Index of all concrete indices this index abstraction is referring to.
    • getFailureIndices

      public List<Index> getFailureIndices(Metadata metadata)
      Description copied from interface: IndexAbstraction
      It retrieves the failure indices of an index abstraction given it supports the failure store.
      Specified by:
      getFailureIndices in interface IndexAbstraction
      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

      @Nullable public Index getWriteIndex()
      Description copied from interface: IndexAbstraction
      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 IndexAbstraction.getIndices(). An index abstraction may also not have a dedicated write index.

      Specified by:
      getWriteIndex in interface IndexAbstraction
      Returns:
      the write index of this index abstraction or null if this index abstraction doesn't have a write index.
    • getWriteFailureIndex

      @Nullable public Index getWriteFailureIndex(Metadata metadata)
      Description copied from interface: IndexAbstraction
      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 true IndexAbstraction.isDataStreamRelated() supports a failure store.
      Specified by:
      getWriteFailureIndex in interface IndexAbstraction
      Parameters:
      metadata - certain index abstraction require the metadata to lazily retrieve the failure indices
      Returns:
      the write failure index of this index abstraction or null if this index abstraction doesn't have a write failure index or it does not support the failure store.
    • getWriteIndex

      public Index getWriteIndex(IndexRequest request, Metadata metadata)
      Specified by:
      getWriteIndex in interface IndexAbstraction
    • getParentDataStream

      public DataStream getParentDataStream()
      Specified by:
      getParentDataStream in interface IndexAbstraction
      Returns:
      the data stream to which this index belongs or null if this is not a concrete index or if it is a concrete index that does not belong to a data stream.
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in interface IndexAbstraction
      Returns:
      whether this index abstraction is hidden or not
    • isSystem

      public boolean isSystem()
      Specified by:
      isSystem in interface IndexAbstraction
      Returns:
      whether this index abstraction should be treated as a system index or not
    • isDataStreamRelated

      public boolean isDataStreamRelated()
      Specified by:
      isDataStreamRelated in interface IndexAbstraction
      Returns:
      whether this index abstraction is related to data streams
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object