- All Superinterfaces:
Source
,Supplier<OverrideSource>
- All Known Implementing Classes:
ClasspathOverrideSource
,FileOverrideSource
,InMemoryOverrideSource
,UrlOverrideSource
A config override setting provides an alternate, or overriding, value for a
config element based on the element's key. Implementations of this interface
furnish override settings as OverrideSource.OverrideData
objects.
The OverrideSource.OverrideData.data
method returns a List
of pairs, each of
which contains a Predicate
which evaluates the config key and a
String
which is the overriding value to be used if the predicate is
true
. The config system applies overrides before it applies
filters
, and it applies only the first matching override
it finds.
The config override mechanism affects existing Config
nodes that come
from a ConfigSource
. The override mechanism cannot create additional
Config
nodes, only modify existing ones.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Group of config override settings.Nested classes/interfaces inherited from interface io.helidon.config.spi.Source
Source.Builder<B extends Source.Builder<B>>
-
Method Summary
Modifier and TypeMethodDescriptiondefault OverrideSource
get()
load()
Load override data from the underlying source.Methods inherited from interface io.helidon.config.spi.Source
description, exists, optional, retryPolicy
-
Method Details
-
get
- Specified by:
get
in interfaceSupplier<OverrideSource>
-
load
Load override data from the underlying source.- Returns:
- override data if present, empty otherwise
- Throws:
ConfigException
- in case the loading of data failed
-