Class BaseOptionManager

java.lang.Object
org.apache.drill.exec.server.options.BaseOptionManager
All Implemented Interfaces:
Iterable<OptionValue>, OptionManager, OptionSet
Direct Known Subclasses:
FallbackOptionManager, SystemOptionManager

public abstract class BaseOptionManager extends Object implements OptionManager
This OptionManager implements some the basic methods and should be extended by concrete implementations.
  • Constructor Details

    • BaseOptionManager

      public BaseOptionManager()
  • Method Details

    • getOption

      public boolean getOption(TypeValidators.BooleanValidator validator)
      Description copied from interface: OptionSet
      Gets the boolean value (from the option value) for the given boolean validator.
      Specified by:
      getOption in interface OptionSet
      Parameters:
      validator - the boolean validator
      Returns:
      the boolean value
    • getOption

      public double getOption(TypeValidators.DoubleValidator validator)
      Description copied from interface: OptionSet
      Gets the double value (from the option value) for the given double validator.
      Specified by:
      getOption in interface OptionSet
      Parameters:
      validator - the double validator
      Returns:
      the double value
    • getOption

      public long getOption(TypeValidators.LongValidator validator)
      Description copied from interface: OptionSet
      Gets the long value (from the option value) for the given long validator.
      Specified by:
      getOption in interface OptionSet
      Parameters:
      validator - the long validator
      Returns:
      the long value
    • getOption

      public String getOption(TypeValidators.StringValidator validator)
      Description copied from interface: OptionSet
      Gets the string value (from the option value) for the given string validator.
      Specified by:
      getOption in interface OptionSet
      Parameters:
      validator - the string validator
      Returns:
      the string value
    • getBoolean

      public boolean getBoolean(String name)
      Description copied from interface: OptionSet
      Return the value of a Boolean option.
      Specified by:
      getBoolean in interface OptionSet
      Parameters:
      name - option name
      Returns:
      the Boolean value
    • getInt

      public int getInt(String name)
      Description copied from interface: OptionSet
      Return the value of a long option as an int
      Specified by:
      getInt in interface OptionSet
      Parameters:
      name - option name
      Returns:
      the long value
    • getLong

      public long getLong(String name)
      Description copied from interface: OptionSet
      Return the value of a long option.
      Specified by:
      getLong in interface OptionSet
      Parameters:
      name - option name
      Returns:
      the long value
    • getDouble

      public double getDouble(String name)
      Description copied from interface: OptionSet
      Return the value of a double option.
      Specified by:
      getDouble in interface OptionSet
      Parameters:
      name - option name
      Returns:
      the double value
    • getString

      public String getString(String name)
      Description copied from interface: OptionSet
      Return the value of a String option.
      Specified by:
      getString in interface OptionSet
      Parameters:
      name - option name
      Returns:
      the String value
    • getInternalOptionList

      public OptionList getInternalOptionList()
      Description copied from interface: OptionManager
      Returns all the internal options contained in this option manager.
      Specified by:
      getInternalOptionList in interface OptionManager
      Returns:
      All the internal options contained in this option manager.
    • getPublicOptionList

      public OptionList getPublicOptionList()
      Description copied from interface: OptionManager
      Returns all the public options contained in this option manager.
      Specified by:
      getPublicOptionList in interface OptionManager
      Returns:
      All the public options contained in this option manager.
    • setLocalOption

      public void setLocalOption(String name, boolean value)
      Description copied from interface: OptionManager
      Sets a boolean option on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      public void setLocalOption(String name, long value)
      Description copied from interface: OptionManager
      Sets a long option on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      public void setLocalOption(String name, double value)
      Description copied from interface: OptionManager
      Sets a double option on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      public void setLocalOption(String name, String value)
      Description copied from interface: OptionManager
      Sets a String option on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      public void setLocalOption(String name, Object value)
      Description copied from interface: OptionManager
      Sets an option on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      public void setLocalOption(OptionValue.Kind kind, String name, String valueStr)
      Description copied from interface: OptionManager
      Sets an option of the specified OptionValue.Kind on the OptionManager.
      Specified by:
      setLocalOption in interface OptionManager
      Parameters:
      kind - The kind of the option.
      name - The name of the option.
      valueStr - The value of the option.
    • setLocalOptionHelper

      protected abstract void setLocalOptionHelper(OptionValue optionValue)
    • getScope

      protected abstract OptionValue.OptionScope getScope()