Class BaseOptionManager
java.lang.Object
org.apache.drill.exec.server.options.BaseOptionManager
- All Implemented Interfaces:
Iterable<OptionValue>
,OptionManager
,OptionSet
- Direct Known Subclasses:
FallbackOptionManager
,SystemOptionManager
This
OptionManager
implements some the basic methods and should be
extended by concrete implementations.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(String name) Return the value of a Boolean option.double
Return the value of a double option.int
Return the value of a long option as an intReturns all the internal options contained in this option manager.long
Return the value of a long option.boolean
getOption
(TypeValidators.BooleanValidator validator) Gets the boolean value (from the option value) for the given boolean validator.double
getOption
(TypeValidators.DoubleValidator validator) Gets the double value (from the option value) for the given double validator.long
getOption
(TypeValidators.LongValidator validator) Gets the long value (from the option value) for the given long validator.getOption
(TypeValidators.StringValidator validator) Gets the string value (from the option value) for the given string validator.Returns all the public options contained in this option manager.protected abstract OptionValue.OptionScope
getScope()
Return the value of a String option.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 valueStr) Sets an option of the specifiedOptionValue.Kind
on theOptionManager
.protected abstract void
setLocalOptionHelper
(OptionValue optionValue) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.drill.exec.server.options.OptionManager
deleteAllLocalOptions, deleteLocalOption, getOptionDefinition, getOptionList
Methods inherited from interface org.apache.drill.exec.server.options.OptionSet
getDefault, getOption
-
Constructor Details
-
BaseOptionManager
public BaseOptionManager()
-
-
Method Details
-
getOption
Description copied from interface:OptionSet
Gets the boolean value (from the option value) for the given boolean validator. -
getOption
Description copied from interface:OptionSet
Gets the double value (from the option value) for the given double validator. -
getOption
Description copied from interface:OptionSet
Gets the long value (from the option value) for the given long validator. -
getOption
Description copied from interface:OptionSet
Gets the string value (from the option value) for the given string validator. -
getBoolean
Description copied from interface:OptionSet
Return the value of a Boolean option.- Specified by:
getBoolean
in interfaceOptionSet
- Parameters:
name
- option name- Returns:
- the Boolean value
-
getInt
Description copied from interface:OptionSet
Return the value of a long option as an int -
getLong
Description copied from interface:OptionSet
Return the value of a long option. -
getDouble
Description copied from interface:OptionSet
Return the value of a double option. -
getString
Description copied from interface:OptionSet
Return the value of a String option. -
getInternalOptionList
Description copied from interface:OptionManager
Returns all the internal options contained in this option manager.- Specified by:
getInternalOptionList
in interfaceOptionManager
- Returns:
- All the internal options contained in this option manager.
-
getPublicOptionList
Description copied from interface:OptionManager
Returns all the public options contained in this option manager.- Specified by:
getPublicOptionList
in interfaceOptionManager
- Returns:
- All the public options contained in this option manager.
-
setLocalOption
Description copied from interface:OptionManager
Sets a boolean option on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Description copied from interface:OptionManager
Sets a long option on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Description copied from interface:OptionManager
Sets a double option on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Description copied from interface:OptionManager
Sets a String option on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Description copied from interface:OptionManager
Sets an option on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
name
- The name of the option.value
- The value of the option.
-
setLocalOption
Description copied from interface:OptionManager
Sets an option of the specifiedOptionValue.Kind
on theOptionManager
.- Specified by:
setLocalOption
in interfaceOptionManager
- Parameters:
kind
- The kind of the option.name
- The name of the option.valueStr
- The value of the option.
-
setLocalOptionHelper
-
getScope
-