Class Configuration

  • All Implemented Interfaces:
    Root, Block

    public class Configuration
    extends Object
    implements Root
    The Nyx configuration. The configuration is a live object that resolves each option lazily, only when required. This not only improves the overall performances but is also safer as in case of malformed configuration options, only those actually needed are resolved. This means that even if the configuration sources don't change throughout a release process, the state of the configuration may change every time a not yet resolved oprion is requested and evaluated. The configuration is layered, where each layer represents a source of configuration options. There is a clear definition of priorities among different layers so there is a clear precedence of options coming from one layer or another. Thanks to this, each option can be overridden by other layer with higher priority. There must be only one instance of this class for every execution and it's retrieved by Nyx.configuration().