Package org.apache.flink.configuration
Class ConfigOptions.OptionBuilder
- java.lang.Object
-
- org.apache.flink.configuration.ConfigOptions.OptionBuilder
-
- Enclosing class:
- ConfigOptions
public static final class ConfigOptions.OptionBuilder extends Object
The option builder is used to create aConfigOption. It is instantiated viaConfigOptions.key(String).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ConfigOptions.TypedConfigOptionBuilder<Boolean>booleanType()Defines that the value of the option should be ofBooleantype.<T> ConfigOption<T>defaultValue(T value)Deprecated.define the type explicitly first with one of the intType(), stringType(), etc.ConfigOptions.TypedConfigOptionBuilder<Double>doubleType()Defines that the value of the option should be ofDoubletype.ConfigOptions.TypedConfigOptionBuilder<java.time.Duration>durationType()Defines that the value of the option should be ofDurationtype.<T extends Enum<T>>
ConfigOptions.TypedConfigOptionBuilder<T>enumType(Class<T> enumClass)Defines that the value of the option should be ofEnumtype.ConfigOptions.TypedConfigOptionBuilder<Float>floatType()Defines that the value of the option should be ofFloattype.ConfigOptions.TypedConfigOptionBuilder<Integer>intType()Defines that the value of the option should be ofIntegertype.ConfigOptions.TypedConfigOptionBuilder<Long>longType()Defines that the value of the option should be ofLongtype.ConfigOptions.TypedConfigOptionBuilder<Map<String,String>>mapType()Defines that the value of the option should be a set of properties, which can be represented asMap<String, String>.ConfigOptions.TypedConfigOptionBuilder<MemorySize>memoryType()Defines that the value of the option should be ofMemorySizetype.ConfigOption<String>noDefaultValue()Deprecated.define the type explicitly first with one of the intType(), stringType(), etc.ConfigOptions.TypedConfigOptionBuilder<String>stringType()Defines that the value of the option should be ofStringtype.
-
-
-
Method Detail
-
booleanType
public ConfigOptions.TypedConfigOptionBuilder<Boolean> booleanType()
Defines that the value of the option should be ofBooleantype.
-
intType
public ConfigOptions.TypedConfigOptionBuilder<Integer> intType()
Defines that the value of the option should be ofIntegertype.
-
longType
public ConfigOptions.TypedConfigOptionBuilder<Long> longType()
Defines that the value of the option should be ofLongtype.
-
floatType
public ConfigOptions.TypedConfigOptionBuilder<Float> floatType()
Defines that the value of the option should be ofFloattype.
-
doubleType
public ConfigOptions.TypedConfigOptionBuilder<Double> doubleType()
Defines that the value of the option should be ofDoubletype.
-
stringType
public ConfigOptions.TypedConfigOptionBuilder<String> stringType()
Defines that the value of the option should be ofStringtype.
-
durationType
public ConfigOptions.TypedConfigOptionBuilder<java.time.Duration> durationType()
Defines that the value of the option should be ofDurationtype.
-
memoryType
public ConfigOptions.TypedConfigOptionBuilder<MemorySize> memoryType()
Defines that the value of the option should be ofMemorySizetype.
-
enumType
public <T extends Enum<T>> ConfigOptions.TypedConfigOptionBuilder<T> enumType(Class<T> enumClass)
Defines that the value of the option should be ofEnumtype.- Parameters:
enumClass- Concrete type of the expected enum.
-
mapType
public ConfigOptions.TypedConfigOptionBuilder<Map<String,String>> mapType()
Defines that the value of the option should be a set of properties, which can be represented asMap<String, String>.
-
defaultValue
@Deprecated public <T> ConfigOption<T> defaultValue(T value)
Deprecated.define the type explicitly first with one of the intType(), stringType(), etc.Creates a ConfigOption with the given default value.This method does not accept "null". For options with no default value, choose one of the
noDefaultValuemethods.- Type Parameters:
T- The type of the default value.- Parameters:
value- The default value for the config option- Returns:
- The config option with the default value.
-
noDefaultValue
@Deprecated public ConfigOption<String> noDefaultValue()
Deprecated.define the type explicitly first with one of the intType(), stringType(), etc.Creates a string-valued option with no default value. String-valued options are the only ones that can have no default value.- Returns:
- The created ConfigOption.
-
-