Interface ConfigSourceRuntime

public interface ConfigSourceRuntime
The runtime of a config source. For a single Config, there is one source runtime for each configured config source.
  • Method Details

    • onChange

      void onChange(BiConsumer<String,ConfigNode> change)
      Change support for a runtime.
      change - change listener
    • load

      Load the config source if it is eager (such as ParsableSource or NodeConfigSource.

      For LazyConfigSource, this method may return an empty optional (if no key was yet requested), or a node with currently known keys and values.

      loaded data
    • node

      Get a single config node based on the key. Use this method if you are interested in a specific key, as it works both for eager and lazy config sources.
      key - key of the node to retrieve
      value on the key, or empty if not present
    • description

      String description()
      Description of the underlying config source.
      description of the source
    • isLazy

      boolean isLazy()
      If a config source is lazy, its load() method always returns empty and you must use node(String) methods to retrieve its values.
      true if the underlying config source cannot load whole configuration tree