Class Setting.AffixSetting<T>

    • Method Detail

      • getSettingsDependencies

        public java.util.Set<Setting<?>> getSettingsDependencies​(java.lang.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 java.lang.String innerGetRaw​(Settings settings)
      • getConcreteSettingForNamespace

        public Setting<T> getConcreteSettingForNamespace​(java.lang.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 java.lang.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 java.util.stream.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 java.util.Set<java.lang.String> getNamespaces​(Settings settings)
        Returns distinct namespaces for the given settings
      • getAsMap

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