Class Setting<T>

org.elasticsearch.common.settings.Setting<T>
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject
Direct Known Subclasses:
SecureSetting, Setting.AffixSetting

public class Setting<T> extends implements org.elasticsearch.common.xcontent.ToXContentObject
A setting. Encapsulates typical stuff like default value, parsing, and scope. Some (SettingsProperty.Dynamic) can by modified at run time using the API. All settings inside elasticsearch or in any of the plugins should use this type-safe and generic settings infrastructure together with AbstractScopedSettings. This class contains several utility methods that makes it straight forward to add settings for the majority of the cases. For instance a simple boolean settings can be defined like this:

 public static final Setting<Boolean>; MY_BOOLEAN = Setting.boolSetting("my.bool.setting", true, SettingsProperty.NodeScope);
 
To retrieve the value of the setting a Settings object can be passed directly to the get(Settings) method.
 final boolean myBooleanValue = MY_BOOLEAN.get(settings);
 
It's recommended to use typed settings rather than string based settings. For example adding a setting for an enum type:

 public enum Color {
     RED, GREEN, BLUE;
 }
 public static final Setting<Color> MY_BOOLEAN =
     new Setting<>("my.color.setting", Color.RED.toString(), Color::valueOf, SettingsProperty.NodeScope);
 
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A key that allows for static pre and suffix.
    static class 
     
    static interface 
    Allows an affix setting to declare a dependency on another affix setting.
    static class 
     
    static interface 
     
    static class 
     
    static class 
     
    static interface 
    Allows a setting to declare a dependency on another setting being set.
    static class 
     
    static interface 
    Represents a validator for a setting.

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected <>
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     key,  defaultValue, <,​T> parser, Setting.Property... properties)
    Creates a new Setting instance
     key,  defaultValue, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
    Creates a new Setting instance.
     key, <> defaultValue, <,​T> parser, Setting.Property... properties)
    Creates a new Setting instance
     key, Setting<T> fallBackSetting, <,​T> parser, Setting.Property... properties)
    Creates a new Setting instance
     key, Setting<T> fallbackSetting, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
    Creates a new Setting instance
    Setting​(Setting.Key key, <> defaultValue, <,​T> parser, Setting.Property... properties)
    Creates a new Setting instance
    Setting​(Setting.Key key, <> defaultValue, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
    Creates a new Setting instance.
    Setting​(Setting.Key key, Setting<T> fallbackSetting, <,​T> parser, Setting.Property... properties)
    Creates a new Setting instance
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Setting.AffixSetting<T>
     prefix,  suffix, <,​,​Setting<T>> delegateFactory, Setting.AffixSettingDependency... dependencies)
     
    static <T> Setting.AffixSetting<T>
     prefix,  suffix, <,​Setting<T>> delegateFactory, Setting.AffixSettingDependency... dependencies)
    This setting type allows to validate settings that have the same type and a common prefix and suffix.
    static >
     key, boolean defaultValue, Setting.Property... properties)
     
    static >
     key, boolean defaultValue, > validator, Setting.Property... properties)
     
    static >
     key, <> defaultValueFn, Setting.Property... properties)
     
    static >
     key, > fallbackSetting, Setting.Property... properties)
     
    static >
     key, > fallbackSetting, > validator, Setting.Property... properties)
     
     key, <> defaultValue, Setting.Property... properties)
     
     key, <> defaultValue, ByteSizeValue minValue, ByteSizeValue maxValue, Setting.Property... properties)
     
     key, Setting<ByteSizeValue> fallbackSetting, Setting.Property... properties)
     
     key, ByteSizeValue value, Setting.Property... properties)
     
     key, ByteSizeValue defaultValue, ByteSizeValue minValue, ByteSizeValue maxValue, Setting.Property... properties)
     
    void
    diff​(Settings.Builder builder, Settings source, Settings defaultSettings)
    Add this setting to the builder if it doesn't exists in the source settings.
    static >
     key, double defaultValue, double minValue, double maxValue, Setting.Property... properties)
     
    static >
     key, double defaultValue, double minValue, Setting.Property... properties)
     
    static <T extends <T>>
    Setting<T>
    <T> clazz,  key, Setting<T> fallbackSetting, Setting.Validator<T> validator, Setting.Property... properties)
    Creates a setting where the allowed values are defined as enum constants.
    static <T extends <T>>
    Setting<T>
    <T> clazz,  key, T defaultValue, Setting.Property... properties)
    Creates a setting where the allowed values are defined as enum constants.
    boolean
     o)
     
    boolean
    exists​(Settings settings)
    Returns true if and only if this setting is present in the given settings instance.
    boolean
     
    boolean
    Returns true if and only if this setting including fallback settings is present in the given settings instance.
    static >
     key, float defaultValue, float minValue, Setting.Property... properties)
     
    static >
     key, float defaultValue, Setting.Property... properties)
     
    get​(Settings settings)
    Returns the settings value.
    get​(Settings primary, Settings secondary)
    Returns the value for this setting but falls back to the second provided settings object
     key)
     
    getDefault​(Settings settings)
    Returns the default value for this setting.
    getDefaultRaw​(Settings settings)
    Returns the default value string representation for this setting.
    Returns the settings key or a prefix if this setting is a group setting.
    Returns the setting properties
    Returns the original representation of a setting key.
     key)
    Returns a set of settings that are required at validation time.
     key, <Settings> validator, Setting.Property... properties)
     
     key, Setting.Property... properties)
     
    int
     
    boolean
    Returns true if this setting has an index scope, otherwise false
    boolean
    Returns true if this setting has a node scope, otherwise false
    static >
     key, int defaultValue, int minValue, int maxValue, Setting.Property... properties)
     
    static >
     key, int defaultValue, int minValue, Setting.Property... properties)
     
    static >
     key, int defaultValue, int minValue, > validator, Setting.Property... properties)
     
    static >
     key, int defaultValue, Setting.Property... properties)
     
    static >
     key, > fallbackSetting, int minValue, int maxValue, Setting.Property... properties)
     
    static >
     key, > fallbackSetting, int minValue, Setting.Property... properties)
     
    static >
     key, > fallbackSetting, int minValue, > validator, Setting.Property... properties)
     
    boolean
    Returns true if this setting's value can be checked for equality across all nodes.
    boolean
    Returns true if this setting is deprecated, otherwise false
    boolean
    Returns true if this setting is dynamically updateable, otherwise false
    boolean
    Returns true if this setting must be filtered, otherwise false
    boolean
    Returns true if this setting is final, otherwise false
    boolean
     
    boolean
    Returns true if this setting is dynamically updateable by operators, otherwise false
    boolean
     
    boolean
    isSecure​(Settings settings)
    Checks whether this is a secure setting.
    static <T> <T>>
     key, <,​T> singleValueParser, <<>> defaultStringValue, Setting.Property... properties)
     
    static <T> <T>>
     key, <,​T> singleValueParser, <<>> defaultStringValue, <T>> validator, Setting.Property... properties)
     
    static <T> <T>>
     key, <> defaultStringValue, <,​T> singleValueParser, Setting.Property... properties)
     
    static <T> <T>>
     key, <> defaultStringValue, <,​T> singleValueParser, <T>> validator, Setting.Property... properties)
     
    static <T> <T>>
     key, <T>> fallbackSetting, <,​T> singleValueParser, <<>> defaultStringValue, Setting.Property... properties)
     
    static <T> <T>>
     key, <T>> fallbackSetting, <,​T> singleValueParser, <<>> defaultStringValue, <T>> validator, Setting.Property... properties)
     
    static <T> <T>>
     key, <T>> fallbackSetting, <,​T> singleValueParser, Setting.Property... properties)
     
    static >
     key, long defaultValue, long minValue, Setting.Property... properties)
     
    boolean
     toTest)
    Returns true iff the given key matches the settings key or if this setting is a group setting if the given key is part of the settings group.
     key,  defaultPercentage, Setting.Property... properties)
    Creates a setting which specifies a memory size.
     key, <> defaultValue, Setting.Property... properties)
    Creates a setting which specifies a memory size.
     key, ByteSizeValue defaultValue, Setting.Property... properties)
    Creates a setting which specifies a memory size.
     s, ByteSizeValue minValue, ByteSizeValue maxValue,  key)
     
    static int
     s, int minValue, int maxValue,  key)
     
    static int
     s, int minValue, int maxValue,  key, boolean isFiltered)
     
    static int
     s, int minValue,  key)
     
    static int
     s, int minValue,  key, boolean isFiltered)
     
    static long
     s, long minValue,  key)
     
    static org.elasticsearch.core.TimeValue
     s, org.elasticsearch.core.TimeValue minValue,  key)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, org.elasticsearch.core.TimeValue defaultValue, Setting.Property... properties)
     
    static <T> Setting.AffixSetting<T>
     prefix, <,​Setting<T>> delegateFactory)
    This setting type allows to validate settings that have the same type and a common prefix.
    static >
     key,  defaultValue, Setting.Property... properties)
    Creates a new Setting instance with a String value
    static >
     key,  defaultValue, > validator, Setting.Property... properties)
     
    static >
     key, Setting.Property... properties)
     
    static >
     key, > validator, Setting.Property... properties)
     
    static >
     key, > validator, > fallback, Setting.Property... properties)
     
    static >
     key, > fallback, <,​> parser, Setting.Property... properties)
     
    static >
     key, > fallback, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, <Settings,​org.elasticsearch.core.TimeValue> defaultValue, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, Setting<org.elasticsearch.core.TimeValue> fallBackSetting, Setting.Validator<org.elasticsearch.core.TimeValue> validator, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, org.elasticsearch.core.TimeValue defaultValue, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, org.elasticsearch.core.TimeValue defaultValue, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
     
    static Setting<org.elasticsearch.core.TimeValue>
     key, org.elasticsearch.core.TimeValue defaultValue, org.elasticsearch.core.TimeValue minValue, org.elasticsearch.core.TimeValue maxValue, Setting.Property... properties)
     
     
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
     key, Version defaultValue, Setting.Property... properties)
     

    Methods inherited from class java.lang.

    , , , , , , ,

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Field Details

    • defaultValue

      protected final <> defaultValue
  • Constructor Details

    • Setting

      public Setting(Setting.Key key, <> defaultValue, <,​T> parser, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      defaultValue - a default value function that returns the default values string representation.
      parser - a parser that parses the string rep into a complex datatype.
      properties - properties for this setting like scope, filtering...
    • Setting

      public Setting(Setting.Key key, <> defaultValue, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
      Creates a new Setting instance.
      Parameters:
      key - the settings key for this setting
      defaultValue - a default value function that results a string representation of the default value
      parser - a parser that parses a string representation into the concrete type for this setting
      validator - a Setting.Validator for validating this setting
      properties - properties for this setting
    • Setting

      public Setting( key,  defaultValue, <,​T> parser, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      defaultValue - a default value.
      parser - a parser that parses the string rep into a complex datatype.
      properties - properties for this setting like scope, filtering...
    • Setting

      public Setting( key,  defaultValue, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
      Creates a new Setting instance.
      Parameters:
      key - the settings key for this setting
      defaultValue - a default value function that results a string representation of the default value
      parser - a parser that parses a string representation into the concrete type for this setting
      validator - a Setting.Validator for validating this setting
      properties - properties for this setting
    • Setting

      public Setting( key, <> defaultValue, <,​T> parser, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      defaultValue - a default value function that returns the default values string representation.
      parser - a parser that parses the string rep into a complex datatype.
      properties - properties for this setting like scope, filtering...
    • Setting

      public Setting( key, Setting<T> fallbackSetting, <,​T> parser, Setting.Validator<T> validator, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      fallbackSetting - a setting who's value to fallback on if this setting is not defined
      parser - a parser that parses the string rep into a complex datatype.
      validator - a Setting.Validator for validating this setting
      properties - properties for this setting like scope, filtering...
    • Setting

      public Setting(Setting.Key key, Setting<T> fallbackSetting, <,​T> parser, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      fallbackSetting - a setting who's value to fallback on if this setting is not defined
      parser - a parser that parses the string rep into a complex datatype.
      properties - properties for this setting like scope, filtering...
    • Setting

      public Setting( key, Setting<T> fallBackSetting, <,​T> parser, Setting.Property... properties)
      Creates a new Setting instance
      Parameters:
      key - the settings key for this setting.
      fallBackSetting - a setting to fall back to if the current setting is not set.
      parser - a parser that parses the string rep into a complex datatype.
      properties - properties for this setting like scope, filtering...
  • Method Details

    • getKey

      public final  getKey()
      Returns the settings key or a prefix if this setting is a group setting. Note: this method should not be used to retrieve a value from a Settings object. Use get(Settings) instead
      See Also:
      isGroupSetting()
    • getRawKey

      public final Setting.Key getRawKey()
      Returns the original representation of a setting key.
    • isDynamic

      public final boolean isDynamic()
      Returns true if this setting is dynamically updateable, otherwise false
    • isOperatorOnly

      public final boolean isOperatorOnly()
      Returns true if this setting is dynamically updateable by operators, otherwise false
    • isFinal

      public final boolean isFinal()
      Returns true if this setting is final, otherwise false
    • isInternalIndex

      public final boolean isInternalIndex()
    • isPrivateIndex

      public final boolean isPrivateIndex()
    • isSecure

      public final boolean isSecure(Settings settings)
      Checks whether this is a secure setting.
      Parameters:
      settings - used to check whether this setting is secure
      Returns:
      whether this is a secure setting.
    • getProperties

      public <Setting.Property> getProperties()
      Returns the setting properties
      See Also:
      Setting.Property
    • isFiltered

      public boolean isFiltered()
      Returns true if this setting must be filtered, otherwise false
    • hasNodeScope

      public boolean hasNodeScope()
      Returns true if this setting has a node scope, otherwise false
    • isConsistent

      public boolean isConsistent()
      Returns true if this setting's value can be checked for equality across all nodes. Only SecureSetting instances may have this qualifier.
    • hasIndexScope

      public boolean hasIndexScope()
      Returns true if this setting has an index scope, otherwise false
    • isDeprecated

      public boolean isDeprecated()
      Returns true if this setting is deprecated, otherwise false
    • getDefaultRaw

      public  getDefaultRaw(Settings settings)
      Returns the default value string representation for this setting.
      Parameters:
      settings - a settings object for settings that has a default value depending on another setting if available
    • getDefault

      public T getDefault(Settings settings)
      Returns the default value for this setting.
      Parameters:
      settings - a settings object for settings that has a default value depending on another setting if available
    • exists

      public boolean exists(Settings settings)
      Returns true if and only if this setting is present in the given settings instance. Note that fallback settings are excluded.
      Parameters:
      settings - the settings
      Returns:
      true if the setting is present in the given settings instance, otherwise false
    • exists

      public boolean exists(Settings.Builder builder)
    • existsOrFallbackExists

      public boolean existsOrFallbackExists(Settings settings)
      Returns true if and only if this setting including fallback settings is present in the given settings instance.
      Parameters:
      settings - the settings
      Returns:
      true if the setting including fallback settings is present in the given settings instance, otherwise false
    • get

      public T get(Settings settings)
      Returns the settings value. If the setting is not present in the given settings object the default value is returned instead.
    • diff

      public void diff(Settings.Builder builder, Settings source, Settings defaultSettings)
      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.
      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
    • match

      public final boolean match( toTest)
      Returns true iff the given key matches the settings key or if this setting is a group setting if the given key is part of the settings group.
      See Also:
      isGroupSetting()
    • toXContent

      public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • toString

      public  toString()
      Overrides:
       in class 
    • get

      public final T get(Settings primary, Settings secondary)
      Returns the value for this setting but falls back to the second provided settings object
    • getConcreteSetting

      public  key)
    • getSettingsDependencies

      public < key)
      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.
    • versionSetting

      public static  key, Version defaultValue, Setting.Property... properties)
    • floatSetting

      public static > floatSetting( key, float defaultValue, Setting.Property... properties)
    • floatSetting

      public static > floatSetting( key, float defaultValue, float minValue, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, int defaultValue, int minValue, int maxValue, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, int defaultValue, int minValue, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, int defaultValue, int minValue, > validator, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, > fallbackSetting, int minValue, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, > fallbackSetting, int minValue, int maxValue, Setting.Property... properties)
    • intSetting

      public static > intSetting( key, > fallbackSetting, int minValue, > validator, Setting.Property... properties)
    • longSetting

      public static > longSetting( key, long defaultValue, long minValue, Setting.Property... properties)
    • simpleString

      public static > simpleString( key, Setting.Property... properties)
    • simpleString

      public static > simpleString( key, > validator, Setting.Property... properties)
    • simpleString

      public static > simpleString( key, > validator, > fallback, Setting.Property... properties)
    • simpleString

      public static > simpleString( key,  defaultValue, > validator, Setting.Property... properties)
    • simpleString

      public static > simpleString( key, > fallback, Setting.Property... properties)
    • simpleString

      public static > simpleString( key, > fallback, <,​> parser, Setting.Property... properties)
    • simpleString

      public static > simpleString( key,  defaultValue, Setting.Property... properties)
      Creates a new Setting instance with a String value
      Parameters:
      key - the settings key for this setting.
      defaultValue - the default String value.
      properties - properties for this setting like scope, filtering...
      Returns:
      the Setting Object
    • parseInt

      public static int parseInt( s, int minValue,  key)
    • parseInt

      public static int parseInt( s, int minValue,  key, boolean isFiltered)
    • parseInt

      public static int parseInt( s, int minValue, int maxValue,  key)
    • parseInt

      public static int parseInt( s, int minValue, int maxValue,  key, boolean isFiltered)
    • parseLong

      public static long parseLong( s, long minValue,  key)
    • parseTimeValue

      public static org.elasticsearch.core.TimeValue parseTimeValue( s, org.elasticsearch.core.TimeValue minValue,  key)
    • intSetting

      public static > intSetting( key, int defaultValue, Setting.Property... properties)
    • boolSetting

      public static > boolSetting( key, boolean defaultValue, Setting.Property... properties)
    • boolSetting

      public static > boolSetting( key, > fallbackSetting, Setting.Property... properties)
    • boolSetting

      public static > boolSetting( key, > fallbackSetting, > validator, Setting.Property... properties)
    • boolSetting

      public static > boolSetting( key, boolean defaultValue, > validator, Setting.Property... properties)
    • boolSetting

      public static > boolSetting( key, <> defaultValueFn, Setting.Property... properties)
    • byteSizeSetting

      public static  key, ByteSizeValue value, Setting.Property... properties)
    • byteSizeSetting

      public static  key, Setting<ByteSizeValue> fallbackSetting, Setting.Property... properties)
    • byteSizeSetting

      public static  key, <> defaultValue, Setting.Property... properties)
    • byteSizeSetting

      public static  key, ByteSizeValue defaultValue, ByteSizeValue minValue, ByteSizeValue maxValue, Setting.Property... properties)
    • byteSizeSetting

      public static  key, <> defaultValue, ByteSizeValue minValue, ByteSizeValue maxValue, Setting.Property... properties)
    • parseByteSize

      public static  s, ByteSizeValue minValue, ByteSizeValue maxValue,  key)
    • enumSetting

      public static <T extends <T>> <T> clazz,  key, T defaultValue, Setting.Property... properties)
      Creates a setting where the allowed values are defined as enum constants. All enum constants must be uppercase.
      Type Parameters:
      T - the generics type parameter reflecting the actual type of the enum
      Parameters:
      clazz - the enum class
      key - the key for the setting
      defaultValue - the default value for this setting
      properties - properties for this setting like scope, filtering...
      Returns:
      the setting object
    • enumSetting

      public static <T extends <T>> <T> clazz,  key, Setting<T> fallbackSetting, Setting.Validator<T> validator, Setting.Property... properties)
      Creates a setting where the allowed values are defined as enum constants. All enum constants must be uppercase.
      Type Parameters:
      T - the generics type parameter reflecting the actual type of the enum
      Parameters:
      clazz - the enum class
      key - the key for the setting
      fallbackSetting - the fallback setting for this setting
      validator - validator for this setting
      properties - properties for this setting like scope, filtering...
      Returns:
      the setting object
    • memorySizeSetting

      public static  key, ByteSizeValue defaultValue, Setting.Property... properties)
      Creates a setting which specifies a memory size. This can either be specified as an absolute bytes value or as a percentage of the heap memory.
      Parameters:
      key - the key for the setting
      defaultValue - the default value for this setting
      properties - properties properties for this setting like scope, filtering...
      Returns:
      the setting object
    • memorySizeSetting

      public static  key, <> defaultValue, Setting.Property... properties)
      Creates a setting which specifies a memory size. This can either be specified as an absolute bytes value or as a percentage of the heap memory.
      Parameters:
      key - the key for the setting
      defaultValue - a function that supplies the default value for this setting
      properties - properties properties for this setting like scope, filtering...
      Returns:
      the setting object
    • memorySizeSetting

      public static  key,  defaultPercentage, Setting.Property... properties)
      Creates a setting which specifies a memory size. This can either be specified as an absolute bytes value or as a percentage of the heap memory.
      Parameters:
      key - the key for the setting
      defaultPercentage - the default value of this setting as a percentage of the heap memory
      properties - properties properties for this setting like scope, filtering...
      Returns:
      the setting object
    • listSetting

      public static <T> <T>> listSetting( key, <> defaultStringValue, <,​T> singleValueParser, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, <> defaultStringValue, <,​T> singleValueParser, <T>> validator, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, <T>> fallbackSetting, <,​T> singleValueParser, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, <,​T> singleValueParser, <<>> defaultStringValue, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, <,​T> singleValueParser, <<>> defaultStringValue, <T>> validator, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, @Nullable <T>> fallbackSetting, <,​T> singleValueParser, <<>> defaultStringValue, Setting.Property... properties)
    • listSetting

      public static <T> <T>> listSetting( key, @Nullable <T>> fallbackSetting, <,​T> singleValueParser, <<>> defaultStringValue, <T>> validator, Setting.Property... properties)
    • groupSetting

      public static  key, Setting.Property... properties)
    • groupSetting

      public static  key, <Settings> validator, Setting.Property... properties)
    • timeSetting

      public static  key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
    • timeSetting

      public static  key, <Settings,​org.elasticsearch.core.TimeValue> defaultValue, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
    • timeSetting

      public static  key, org.elasticsearch.core.TimeValue defaultValue, org.elasticsearch.core.TimeValue minValue, org.elasticsearch.core.TimeValue maxValue, Setting.Property... properties)
    • timeSetting

      public static  key, org.elasticsearch.core.TimeValue defaultValue, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
    • timeSetting

      public static  key, org.elasticsearch.core.TimeValue defaultValue, Setting.Property... properties)
    • timeSetting

      public static  key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, Setting.Property... properties)
    • timeSetting

      public static  key, Setting<org.elasticsearch.core.TimeValue> fallBackSetting, Setting.Validator<org.elasticsearch.core.TimeValue> validator, Setting.Property... properties)
    • positiveTimeSetting

      public static  key, org.elasticsearch.core.TimeValue defaultValue, Setting.Property... properties)
    • positiveTimeSetting

      public static  key, Setting<org.elasticsearch.core.TimeValue> fallbackSetting, org.elasticsearch.core.TimeValue minValue, Setting.Property... properties)
    • doubleSetting

      public static > doubleSetting( key, double defaultValue, double minValue, Setting.Property... properties)
    • doubleSetting

      public static > doubleSetting( key, double defaultValue, double minValue, double maxValue, Setting.Property... properties)
    • equals

      public boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class 
    • prefixKeySetting

      public static <T>  prefix, <,​Setting<T>> delegateFactory)
      This setting type allows to validate settings that have the same type and a common prefix. For instance feature.${type}=[true|false] can easily be added with this setting. Yet, prefix key settings don't support updaters out of the box unless getConcreteSetting(String) is used to pull the updater.
    • affixKeySetting

      public static <T>  prefix,  suffix, <,​Setting<T>> delegateFactory, Setting.AffixSettingDependency... dependencies)
      This setting type allows to validate settings that have the same type and a common prefix and suffix. For instance storage.${backend}.enable=[true|false] can easily be added with this setting. Yet, affix key settings don't support updaters out of the box unless getConcreteSetting(String) is used to pull the updater.
    • affixKeySetting

      public static <T>  prefix,  suffix, <,​,​Setting<T>> delegateFactory, Setting.AffixSettingDependency... dependencies)