Interface NodeConfigSource
- All Superinterfaces:
ConfigSource, Source, Supplier<ConfigSource>
- All Known Implementing Classes:
ConfigSources.SystemPropertiesConfigSource, DirectoryConfigSource, MapConfigSource, PrefixedConfigSource
An eager source that can read all data from the underlying origin as a configuration node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Source
Source.Builder<B>Modifier and TypeInterfaceDescriptionstatic interfaceSource.Builder<B extends Source.Builder<B>>Configurable options of aSource. -
Method Summary
Methods inherited from interface ConfigSource
get, initModifier and TypeMethodDescriptiondefault ConfigSourceget()default voidinit(ConfigContext context) Initialize the config source with aConfigContext.Methods inherited from interface Source
description, exists, optional, retryPolicyModifier and TypeMethodDescriptiondefault StringShort, human-readable summary referring to the underlying source.default booleanexists()If the underlying data exist at this time.default booleanoptional()Whether this source is optional.default Optional<RetryPolicy> Retry policy configured on this config source.
-
Method Details
-
load
Loads the underlying source data. This method is only called when the sourceSource.exists().The method can be invoked repeatedly, for example during retries.
- Returns:
- An instance of
Tas read from the underlying origin of the data (if it exists) - Throws:
ConfigException- in case of errors loading from the underlying origin
-