Class SystemIndices

java.lang.Object
org.elasticsearch.indices.SystemIndices

public class SystemIndices
extends java.lang.Object
This class holds the SystemIndexDescriptor objects that represent system indices the node knows about. Methods for determining if an index should be a system index are also provided to reduce the locations within the code that need to deal with SystemIndexDescriptors.
  • Constructor Details

    • SystemIndices

      public SystemIndices​(java.util.Map<java.lang.String,​SystemIndices.Feature> pluginAndModulesDescriptors)
  • Method Details

    • isSystemIndex

      public boolean isSystemIndex​(Index index)
      Determines whether a given index is a system index by comparing its name to the collection of loaded SystemIndexDescriptors
      Parameters:
      index - the Index object to check against loaded SystemIndexDescriptors
      Returns:
      true if the Index's name matches a pattern from a SystemIndexDescriptor
    • isSystemIndex

      public boolean isSystemIndex​(java.lang.String indexName)
      Determines whether a given index is a system index by comparing its name to the collection of loaded SystemIndexDescriptors
      Parameters:
      indexName - the index name to check against loaded SystemIndexDescriptors
      Returns:
      true if the index name matches a pattern from a SystemIndexDescriptor
    • findMatchingDescriptor

      @Nullable public SystemIndexDescriptor findMatchingDescriptor​(java.lang.String name)
      Finds a single matching SystemIndexDescriptor, if any, for the given index name.
      Parameters:
      name - the name of the index
      Returns:
      The matching SystemIndexDescriptor or null if no descriptor is found
      Throws:
      java.lang.IllegalStateException - if multiple descriptors match the name
    • getFeatures

      public java.util.Map<java.lang.String,​SystemIndices.Feature> getFeatures()
    • validateFeatureName

      public static void validateFeatureName​(java.lang.String name, java.lang.String plugin)