Class SystemIndexDescriptor

java.lang.Object
org.elasticsearch.indices.SystemIndexDescriptor

public class SystemIndexDescriptor
extends java.lang.Object
Describes a system index. Provides the information required to create and maintain the system index.
  • Constructor Summary

    Constructors 
    Constructor Description
    SystemIndexDescriptor​(java.lang.String indexPattern, java.lang.String description)  
  • Method Summary

    Modifier and Type Method Description
    static void checkForOverlappingPatterns​(java.util.Map<java.lang.String,​java.util.Collection<SystemIndexDescriptor>> sourceToDescriptors)
    Given a collection of SystemIndexDescriptors and their sources, checks to see if the index patterns of the listed descriptors overlap with any of the other patterns.
    java.lang.String getDescription()  
    java.lang.String getIndexPattern()  
    boolean matchesIndexPattern​(java.lang.String index)
    Checks whether an index name matches the system index name pattern for this descriptor.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SystemIndexDescriptor

      public SystemIndexDescriptor​(java.lang.String indexPattern, java.lang.String description)
      Parameters:
      indexPattern - The pattern of index names that this descriptor will be used for. Must start with a '.' character.
      description - The name of the plugin responsible for this system index.
  • Method Details

    • getIndexPattern

      public java.lang.String getIndexPattern()
      Returns:
      The pattern of index names that this descriptor will be used for.
    • matchesIndexPattern

      public boolean matchesIndexPattern​(java.lang.String index)
      Checks whether an index name matches the system index name pattern for this descriptor.
      Parameters:
      index - The index name to be checked against the index pattern given at construction time.
      Returns:
      True if the name matches the pattern, false otherwise.
    • getDescription

      public java.lang.String getDescription()
      Returns:
      A short description of the purpose of this system index.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • checkForOverlappingPatterns

      public static void checkForOverlappingPatterns​(java.util.Map<java.lang.String,​java.util.Collection<SystemIndexDescriptor>> sourceToDescriptors)
      Given a collection of SystemIndexDescriptors and their sources, checks to see if the index patterns of the listed descriptors overlap with any of the other patterns. If any do, throws an exception.
      Parameters:
      sourceToDescriptors - A map of source (plugin) names to the SystemIndexDescriptors they provide.
      Throws:
      java.lang.IllegalStateException - Thrown if any of the index patterns overlaps with another.