Package org.elasticsearch.indices
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 Summary
Constructors Constructor Description Feature(java.lang.String name, java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors)
Construct a Feature using the default clean-up functionFeature(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 functionFeature(java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors, java.util.Collection<SystemDataStreamDescriptor> dataStreamDescriptors, java.util.Collection<AssociatedIndexDescriptor> associatedIndexDescriptors, TriConsumer<ClusterService,Client,ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> cleanUpFunction)
Construct a Feature with a custom cleanup function -
Method Summary
Modifier and Type Method Description static void
cleanUpFeature(java.util.Collection<? extends IndexPatternMatcher> indexDescriptors, java.util.Collection<? extends IndexPatternMatcher> associatedIndexDescriptors, java.lang.String name, ClusterService clusterService, Client client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus> listener)
Clean up the state of a featurejava.util.Collection<AssociatedIndexDescriptor>
getAssociatedIndexDescriptors()
TriConsumer<ClusterService,Client,ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>>
getCleanUpFunction()
java.util.Collection<SystemDataStreamDescriptor>
getDataStreamDescriptors()
java.lang.String
getDescription()
java.util.Collection<SystemIndexDescriptor>
getIndexDescriptors()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Feature
public Feature(java.lang.String description, java.util.Collection<SystemIndexDescriptor> indexDescriptors, java.util.Collection<SystemDataStreamDescriptor> dataStreamDescriptors, java.util.Collection<AssociatedIndexDescriptor> associatedIndexDescriptors, TriConsumer<ClusterService,Client,ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> cleanUpFunction)Construct a Feature with a custom cleanup function- Parameters:
description
- Description of the featureindexDescriptors
- Collection of objects describing system indices for this featuredataStreamDescriptors
- Collection of objects describing system data streams for this featureassociatedIndexDescriptors
- Collection of objects describing associated indices for this featurecleanUpFunction
- 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 loggingdescription
- Description of the featureindexDescriptors
- 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 loggingdescription
- Description of the featureindexDescriptors
- Patterns describing system indices for this featuredataStreamDescriptors
- Collection of objects describing system data streams for this feature
-
-
Method Details
-
getDescription
public java.lang.String getDescription() -
getIndexDescriptors
-
getDataStreamDescriptors
-
getAssociatedIndexDescriptors
-
getCleanUpFunction
public TriConsumer<ClusterService,Client,ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> getCleanUpFunction() -
cleanUpFeature
public static void cleanUpFeature(java.util.Collection<? extends IndexPatternMatcher> indexDescriptors, java.util.Collection<? extends IndexPatternMatcher> associatedIndexDescriptors, 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 indicesassociatedIndexDescriptors
- List of descriptors of a feature's associated indicesname
- Name of the feature, used in loggingclusterService
- A clusterService, for retrieving cluster metadataclient
- A client, for issuing delete requestslistener
- A listener to return success or failure of cleanup
-