Class Setting.AffixSetting<T>

java.lang.Object
org.elasticsearch.common.settings.Setting<T>
org.elasticsearch.common.settings.Setting.AffixSetting<T>
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject
Enclosing class:
Setting<T>

public static class Setting.AffixSetting<T> extends Setting<T>
  • Constructor Details

  • Method Details

    • getDependencies

      public Set<Setting.AffixSettingDependency> getDependencies()
      Get the raw list of dependencies. This method is exposed for testing purposes and getSettingsDependencies(String) should be preferred for most all cases.
      Returns:
      the raw list of dependencies for this setting
    • getSettingsDependencies

      public Set<Setting.SettingDependency> getSettingsDependencies(String settingsKey)
      Description copied from class: Setting
      Returns a set of settings that are required at validation time. Unless all of the dependencies are present in the settings object validation of setting must fail.
      Overrides:
      getSettingsDependencies in class Setting<T>
    • get

      public T get(Settings settings)
      Description copied from class: Setting
      Returns the settings value. If the setting is not present in the given settings object the default value is returned instead.
      Overrides:
      get in class Setting<T>
    • innerGetRaw

      public String innerGetRaw(Settings settings)
    • getConcreteSetting

      public Setting<T> getConcreteSetting(String key)
      Overrides:
      getConcreteSetting in class Setting<T>
    • getConcreteSettingForNamespace

      public Setting<T> getConcreteSettingForNamespace(String namespace)
      Get a setting with the given namespace filled in for prefix and suffix.
    • diff

      public void diff(Settings.Builder builder, Settings source, Settings defaultSettings)
      Description copied from class: Setting
      Add this setting to the builder if it doesn't exists in the source settings. The value added to the builder is taken from the given default settings object.
      Overrides:
      diff in class Setting<T>
      Parameters:
      builder - the settings builder to fill the diff into
      source - the source settings object to diff
      defaultSettings - the default settings object to diff against
    • getNamespace

      public String getNamespace(Setting<T> concreteSetting)
      Returns the namespace for a concrete setting. Ie. an affix setting with prefix: search. and suffix: username will return remote as a namespace for the setting cluster.remote.username
    • getAllConcreteSettings

      public Stream<Setting<T>> getAllConcreteSettings(Settings settings)
      Returns a stream of all concrete setting instances for the given settings. AffixSetting is only a specification, concrete settings depend on an actual set of setting keys.
    • getNamespaces

      public Set<String> getNamespaces(Settings settings)
      Returns distinct namespaces for the given settings
    • getAsMap

      public Map<String,T> getAsMap(Settings settings)
      Returns a map of all namespaces to it's values give the provided settings