Class SystemIndices.Feature

java.lang.Object
org.elasticsearch.indices.SystemIndices.Feature
Enclosing class:
SystemIndices

public static class SystemIndices.Feature
extends java.lang.Object
Class holding a description of a stateful feature.
  • Constructor Details

    • Feature

      public Feature​(java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors, java.util.Collection<SystemDataStreamDescriptor> dataStreamDescriptors, java.util.Collection<java.lang.String> associatedIndexPatterns, TriConsumer<ClusterService,​Client,​ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> cleanUpFunction)
      Construct a Feature with a custom cleanup function
      Parameters:
      description - Description of the feature
      indexDescriptors - Collection of objects describing system indices for this feature
      dataStreamDescriptors - Collection of objects describing system data streams for this feature
      associatedIndexPatterns - Patterns describing associated indices
      cleanUpFunction - A function that will clean up the feature's state
    • Feature

      public Feature​(java.lang.String name, java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors)
      Construct a Feature using the default clean-up function
      Parameters:
      name - Name of the feature, used in logging
      description - Description of the feature
      indexDescriptors - Patterns describing system indices for this feature
    • Feature

      public Feature​(java.lang.String name, java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors, java.util.Collection<SystemDataStreamDescriptor> dataStreamDescriptors)
      Construct a Feature using the default clean-up function
      Parameters:
      name - Name of the feature, used in logging
      description - Description of the feature
      indexDescriptors - Patterns describing system indices for this feature
      dataStreamDescriptors - Collection of objects describing system data streams for this feature
  • Method Details

    • getDescription

      public java.lang.String getDescription()
    • getIndexDescriptors

      public java.util.Collection<SystemIndexDescriptor> getIndexDescriptors()
    • getDataStreamDescriptors

      public java.util.Collection<SystemDataStreamDescriptor> getDataStreamDescriptors()
    • getAssociatedIndexPatterns

      public java.util.Collection<java.lang.String> getAssociatedIndexPatterns()
    • getCleanUpFunction

    • cleanUpFeature

      public static void cleanUpFeature​(java.util.Collection<SystemIndexDescriptor> indexDescriptors, java.util.Collection<java.lang.String> associatedIndexPatterns, java.lang.String name, ClusterService clusterService, Client client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus> listener)
      Clean up the state of a feature
      Parameters:
      indexDescriptors - List of descriptors of a feature's system indices
      associatedIndexPatterns - List of patterns of a feature's associated indices
      name - Name of the feature, used in logging
      clusterService - A clusterService, for retrieving cluster metadata
      client - A client, for issuing delete requests
      listener - A listener to return success or failure of cleanup