Class Setting.AffixSetting<T>
- java.lang.Object
-
- org.elasticsearch.common.settings.Setting<T>
-
- org.elasticsearch.common.settings.Setting.AffixSetting<T>
-
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public static class Setting.AffixSetting<T> extends Setting<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.common.settings.Setting
Setting.AffixKey, Setting.AffixSetting<T>, Setting.GroupKey, Setting.Key, Setting.ListKey, Setting.Property, Setting.SimpleKey, Setting.Validator<T>
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.settings.Setting
defaultValue
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description AffixSetting(Setting.AffixKey key, Setting<T> delegate, java.util.function.Function<java.lang.String,Setting<T>> delegateFactory, Setting.AffixSetting... dependencies)
-
Method Summary
Modifier and Type Method Description void
diff(Settings.Builder builder, Settings source, Settings defaultSettings)
Add this setting to the builder if it doesn't exists in the source settings.T
get(Settings settings)
Returns the settings value.java.util.stream.Stream<Setting<T>>
getAllConcreteSettings(Settings settings)
Returns a stream of all concrete setting instances for the given settings.java.util.Map<java.lang.String,T>
getAsMap(Settings settings)
Returns a map of all namespaces to it's values give the provided settingsSetting<T>
getConcreteSetting(java.lang.String key)
Setting<T>
getConcreteSettingForNamespace(java.lang.String namespace)
Get a setting with the given namespace filled in for prefix and suffix.java.lang.String
getNamespace(Setting<T> concreteSetting)
Returns the namespace for a concrete setting.java.util.Set<java.lang.String>
getNamespaces(Settings settings)
Returns distinct namespaces for the given settingsjava.util.Set<Setting<?>>
getSettingsDependencies(java.lang.String settingsKey)
Returns a set of settings that are required at validation time.java.lang.String
innerGetRaw(Settings settings)
-
Methods inherited from class org.elasticsearch.common.settings.Setting
affixKeySetting, boolSetting, boolSetting, boolSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, doubleSetting, doubleSetting, equals, exists, existsOrFallbackExists, floatSetting, floatSetting, get, getDefault, getDefaultRaw, getKey, getProperties, getRaw, getRawKey, groupSetting, groupSetting, hashCode, hasIndexScope, hasNodeScope, intSetting, intSetting, intSetting, intSetting, intSetting, isDeprecated, isDynamic, isFiltered, isFinal, isInternalIndex, isPrivateIndex, listSetting, listSetting, listSetting, listSetting, longSetting, match, memorySizeSetting, memorySizeSetting, memorySizeSetting, parseByteSize, parseInt, parseInt, parseLong, parseTimeValue, positiveTimeSetting, positiveTimeSetting, prefixKeySetting, simpleString, simpleString, simpleString, simpleString, simpleString, timeSetting, timeSetting, timeSetting, timeSetting, timeSetting, timeSetting, toString, toXContent, versionSetting
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
AffixSetting
public AffixSetting(Setting.AffixKey key, Setting<T> delegate, java.util.function.Function<java.lang.String,Setting<T>> delegateFactory, Setting.AffixSetting... dependencies)
-
-
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 classSetting<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.
-
innerGetRaw
public java.lang.String innerGetRaw(Settings settings)
-
getConcreteSetting
public Setting<T> getConcreteSetting(java.lang.String key)
- Overrides:
getConcreteSetting
in classSetting<T>
-
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.
-
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 returnremote
as a namespace for the settingcluster.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
-
-