Package ai.dat.core.configuration
Class ConfigOptions
java.lang.Object
ai.dat.core.configuration.ConfigOptions
ConfigOptions are used to build a ConfigOption. The option is typically built in
one of the following pattern:
{@code
// simple string-valued option with a default value
ConfigOption<String> tempDirs = ConfigOptions
.key("tmp.dir")
.stringType()
.defaultValue("/tmp");
// simple integer-valued option with a default value
ConfigOption<Integer> parallelism = ConfigOptions
.key("application.parallelism")
.intType()
.defaultValue(100);
// option of list of integers with a default value
ConfigOption<Integer> parallelism = ConfigOptions
.key("application.ports")
.intType()
.asList()
.defaultValue(8000, 8001, 8002);
// option with no default value
ConfigOption<String> userName = ConfigOptions
.key("user.name")
.stringType()
.noDefaultValue();-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forConfigOptionof list of typeConfigOptions.ListConfigOptionBuilder.static final classThe option builder is used to create aConfigOption.static classBuilder forConfigOptionwith a defined atomic type. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigOptions.OptionBuilderStarts building a newConfigOption.
-
Method Details
-
key
Starts building a newConfigOption.- Parameters:
key- The key for the config option.- Returns:
- The builder for the config option with the given key.
-