Package org.elasticsearch.indices
Class SystemIndices.Feature
java.lang.Object
org.elasticsearch.indices.SystemIndices.Feature
- Enclosing class:
- SystemIndices
Class holding a description of a stateful feature.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceType for the handler that's invoked when all of a feature's system indices have been migrated.static interfaceType for the handler that's invoked prior to migrating a Feature's system indices. -
Constructor Summary
ConstructorsConstructorDescriptionFeature(String name, String description, Collection<SystemIndexDescriptor> indexDescriptors) Construct a Feature using the default clean-up functionFeature(String name, String description, Collection<SystemIndexDescriptor> indexDescriptors, Collection<SystemDataStreamDescriptor> dataStreamDescriptors) Construct a Feature using the default clean-up functionFeature(String name, String description, Collection<SystemIndexDescriptor> indexDescriptors, Collection<SystemDataStreamDescriptor> dataStreamDescriptors, Collection<AssociatedIndexDescriptor> associatedIndexDescriptors, TriConsumer<ClusterService, Client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> cleanUpFunction, SystemIndices.Feature.MigrationPreparationHandler preMigrationFunction, SystemIndices.Feature.MigrationCompletionHandler postMigrationFunction) Construct a Feature with a custom cleanup function -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanUpFeature(Collection<? extends IndexPatternMatcher> indexDescriptors, Collection<? extends IndexPatternMatcher> associatedIndexDescriptors, String name, ClusterService clusterService, Client client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus> listener) Clean up the state of a featurestatic SystemIndices.FeaturefromSystemIndexPlugin(SystemIndexPlugin plugin, Settings settings) Creates aSystemIndices.Featurefrom aSystemIndexPlugin.TriConsumer<ClusterService,Client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> getName()static SystemIndices.FeaturepluginToFeature(SystemIndexPlugin plugin, Settings settings)
-
Constructor Details
-
Feature
public Feature(String name, String description, Collection<SystemIndexDescriptor> indexDescriptors, Collection<SystemDataStreamDescriptor> dataStreamDescriptors, Collection<AssociatedIndexDescriptor> associatedIndexDescriptors, TriConsumer<ClusterService, Client, ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> cleanUpFunction, SystemIndices.Feature.MigrationPreparationHandler preMigrationFunction, SystemIndices.Feature.MigrationCompletionHandler postMigrationFunction) Construct a Feature with a custom cleanup function- Parameters:
name- The name of the featuredescription- 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 statepreMigrationFunction- A function that will be called prior to upgrading any of this plugin's system indicespostMigrationFunction- A function that will be called after upgrading all of this plugin's system indices
-
Feature
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(String name, String description, Collection<SystemIndexDescriptor> indexDescriptors, 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
-
fromSystemIndexPlugin
public static SystemIndices.Feature fromSystemIndexPlugin(SystemIndexPlugin plugin, Settings settings) Creates aSystemIndices.Featurefrom aSystemIndexPlugin.- Parameters:
plugin- TheSystemIndexPluginthat adds this feature.settings- Node-level settings, as this may impact the descriptors returned by the plugin.- Returns:
- A
SystemIndices.Featurewhich represents the feature added by the given plugin.
-
getDescription
-
getIndexDescriptors
-
getDataStreamDescriptors
-
getAssociatedIndexDescriptors
-
getCleanUpFunction
public TriConsumer<ClusterService,Client, getCleanUpFunction()ActionListener<ResetFeatureStateResponse.ResetFeatureStateStatus>> -
getName
-
getPreMigrationFunction
-
getPostMigrationFunction
-
cleanUpFeature
public static void cleanUpFeature(Collection<? extends IndexPatternMatcher> indexDescriptors, Collection<? extends IndexPatternMatcher> associatedIndexDescriptors, 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
-
pluginToFeature
-