Interface OptionManager

All Superinterfaces:
Iterable<OptionValue>, OptionSet
All Known Implementing Classes:
BaseOptionManager, FallbackOptionManager, FragmentOptionManager, InMemoryOptionManager, QueryOptionManager, SessionOptionManager, SystemOptionManager

public interface OptionManager extends OptionSet, Iterable<OptionValue>
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 an OptionManager 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 Details

    • setLocalOption

      void setLocalOption(String name, boolean value)
      Sets a boolean option on the OptionManager.
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      void setLocalOption(String name, long value)
      Sets a long option on the OptionManager.
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      void setLocalOption(String name, double value)
      Sets a double option on the OptionManager.
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      void setLocalOption(String name, String value)
      Sets a String option on the OptionManager.
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      void setLocalOption(String name, Object value)
      Sets an option on the OptionManager.
      Parameters:
      name - The name of the option.
      value - The value of the option.
    • setLocalOption

      void setLocalOption(OptionValue.Kind kind, String name, String value)
      Sets an option of the specified OptionValue.Kind on the OptionManager.
      Parameters:
      kind - The kind of the option.
      name - The name of the option.
      value - The value of the option.
    • deleteLocalOption

      void deleteLocalOption(String name)
      Deletes the option. If the option name is valid (exists in the set of validators produced by SystemOptionManager.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

      @NotNull @NotNull OptionDefinition getOptionDefinition(String name)
      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

      @NotNull @NotNull OptionList getInternalOptionList()
      Returns all the internal options contained in this option manager.
      Returns:
      All the internal options contained in this option manager.
    • getPublicOptionList

      @NotNull @NotNull OptionList getPublicOptionList()
      Returns all the public options contained in this option manager.
      Returns:
      All the public options contained in this option manager.