Class YamlTemplateRegistry

java.lang.Object
org.elasticsearch.xpack.core.template.IndexTemplateRegistry
org.elasticsearch.xpack.core.template.YamlTemplateRegistry
All Implemented Interfaces:
ClusterStateListener

public abstract class YamlTemplateRegistry extends IndexTemplateRegistry
Creates index templates and ingest pipelines based on YAML files defined in resources.yaml.
  • Constructor Details

    • YamlTemplateRegistry

      public YamlTemplateRegistry(Settings nodeSettings, ClusterService clusterService, ThreadPool threadPool, Client client, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry)
    • YamlTemplateRegistry

      public YamlTemplateRegistry(Settings nodeSettings, ClusterService clusterService, ThreadPool threadPool, Client client, org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry, Predicate<String> templateFilter)
  • Method Details

    • getVersion

      public int getVersion()
    • getName

      public abstract String getName()
      Returns:
      A friendly, human-readable name of the index template registry
    • setEnabled

      public void setEnabled(boolean enabled)
    • isEnabled

      public boolean isEnabled()
    • close

      public void close()
    • requiresMasterNode

      protected boolean requiresMasterNode()
      Description copied from class: IndexTemplateRegistry
      Whether the registry should only apply changes when running on the master node. This is useful for plugins where certain actions are performed on master nodes and the templates should match the respective version.
      Overrides:
      requiresMasterNode in class IndexTemplateRegistry
    • getComponentTemplateConfigs

      public Map<String,ComponentTemplate> getComponentTemplateConfigs()
      Description copied from class: IndexTemplateRegistry
      Retrieves return a list of IndexTemplateConfig that represents the component templates that should be installed and managed. Component templates are always installed prior composable templates, so they may be referenced by a composable template.
      Overrides:
      getComponentTemplateConfigs in class IndexTemplateRegistry
      Returns:
      The configurations for the templates that should be installed.
    • getComposableTemplateConfigs

      public Map<String,ComposableIndexTemplate> getComposableTemplateConfigs()
      Description copied from class: IndexTemplateRegistry
      Retrieves return a list of IndexTemplateConfig that represents the composable templates that should be installed and managed.
      Overrides:
      getComposableTemplateConfigs in class IndexTemplateRegistry
      Returns:
      The configurations for the templates that should be installed.
    • getIngestPipelines

      public List<IngestPipelineConfig> getIngestPipelines()
      Description copied from class: IndexTemplateRegistry
      Retrieves a list of IngestPipelineConfig that represents the ingest pipelines that should be installed and managed.
      Overrides:
      getIngestPipelines in class IndexTemplateRegistry
      Returns:
      The configurations for ingest pipelines that should be installed.
    • getLifecyclePolicies

      public List<LifecyclePolicy> getLifecyclePolicies()
      Description copied from class: IndexTemplateRegistry
      Retrieves a list of LifecyclePolicy that represents the ILM policies that should be installed and managed. Only called if ILM is enabled.
      Overrides:
      getLifecyclePolicies in class IndexTemplateRegistry
      Returns:
      The lifecycle policies that should be installed.
    • getVersionProperty

      protected abstract String getVersionProperty()
    • applyRolloverAfterTemplateV2Update

      protected boolean applyRolloverAfterTemplateV2Update()
      Description copied from class: IndexTemplateRegistry
      Allows registries to opt-in for automatic rollover of "relevant" data streams immediately after a composable index template gets updated, including its initial installation. If set to true, then every time a composable index template is being updated, all data streams of which name matches this template's index patterns AND of all matching templates the upgraded one has the highest priority, will be rolled over.
      Overrides:
      applyRolloverAfterTemplateV2Update in class IndexTemplateRegistry
      Returns:
      true if this registry wants to apply automatic rollovers after template V2 upgrades