Interface OptionManager
- All Superinterfaces:
Iterable<OptionValue>
,OptionSet
- All Known Implementing Classes:
BaseOptionManager
,FallbackOptionManager
,FragmentOptionManager
,InMemoryOptionManager
,QueryOptionManager
,SessionOptionManager
,SystemOptionManager
Manager for Drill
options
. Implementations must be case-insensitive to the name of an option.
The options governed by an OptionManager
fall into various categories. These categories are described below.
-
Local: Local options are options who have a value stored in this
OptionManager
. Whether an option is Local to anOptionManager
or not should be irrelevant to the user. - Public: Public options are options that are visible to end users in all the standard tables and rest endpoints.
- Internal: Internal options are options that are only visible to end users if they check special tables and rest endpoints that are not documented. These options are not intended to be modified by users and should only be modified by support during debugging. Internal options are also not gauranteed to be consistent accross patch, minor, or major releases.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes all options.void
deleteLocalOption
(String name) Deletes the option.@NotNull OptionList
Returns all the internal options contained in this option manager.@NotNull OptionDefinition
getOptionDefinition
(String name) Get the option definition corresponding to the given option name.Gets the list of options managed this manager.@NotNull OptionList
Returns all the public options contained in this option manager.void
setLocalOption
(String name, boolean value) Sets a boolean option on theOptionManager
.void
setLocalOption
(String name, double value) Sets a double option on theOptionManager
.void
setLocalOption
(String name, long value) Sets a long option on theOptionManager
.void
setLocalOption
(String name, Object value) Sets an option on theOptionManager
.void
setLocalOption
(String name, String value) Sets a String option on theOptionManager
.void
setLocalOption
(OptionValue.Kind kind, String name, String value) Sets an option of the specifiedOptionValue.Kind
on theOptionManager
.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
setLocalOption
Sets a boolean option on theOptionManager
.- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Sets a long option on theOptionManager
.- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Sets a double option on theOptionManager
.- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Sets a String option on theOptionManager
.- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Sets an option on theOptionManager
.- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Sets an option of the specifiedOptionValue.Kind
on theOptionManager
.- Parameters:
kind
- The kind of the option.name
- The name of the option.value
- The value of the option.
-
deleteLocalOption
Deletes the option. If the option name is valid (exists in the set of validators produced bySystemOptionManager.createDefaultOptionDefinitions()
), but the option was not set within this manager, calling this method should be a no-op.- Parameters:
name
- option name- Throws:
UserException
- message to describe error with value
-
deleteAllLocalOptions
void deleteAllLocalOptions()Deletes all options. If no options are set, calling this method should be no-op.- Throws:
UserException
- message to describe error with value
-
getOptionDefinition
Get the option definition corresponding to the given option name.- Parameters:
name
- The name of the option to retrieve a validator for.- Returns:
- The option validator corresponding to the given option name.
- Throws:
UserException
- - if the definition is not found
-
getOptionList
OptionList getOptionList()Gets the list of options managed this manager.- Returns:
- the list of options
-
getInternalOptionList
Returns all the internal options contained in this option manager.- Returns:
- All the internal options contained in this option manager.
-
getPublicOptionList
Returns all the public options contained in this option manager.- Returns:
- All the public options contained in this option manager.
-