public class OverrideConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>> extends UpdatingConfigSupplier<Message>
Supplier<Service> supplier = new OverrideConfigSupplier<>(
baseServiceConfig,
ImmutableMap.of(
"db.username", "root",
"jdbc.driver", "com.oracle.jdbc.Driver"
));
| Constructor and Description |
|---|
OverrideConfigSupplier(Clock clock,
ConfigSupplier<Message> parent,
Map<String,String> overrides,
boolean strict)
Create a config that wraps a providence message instance.
|
OverrideConfigSupplier(ConfigSupplier<Message> parent,
Map<String,String> overrides)
Create a config that wraps a providence message instance.
|
OverrideConfigSupplier(ConfigSupplier<Message> parent,
Map<String,String> overrides,
boolean strict)
Create a config that wraps a providence message instance.
|
OverrideConfigSupplier(ConfigSupplier<Message> parent,
Properties overrides)
Create a config that wraps a providence message instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Get a simple descriptive name for this config supplier.
|
String |
toString() |
addListener, configTimestamp, get, getClock, reference, removeListener, setclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitoverride, override, snapshotpublic OverrideConfigSupplier(@Nonnull ConfigSupplier<Message> parent, @Nonnull Properties overrides) throws ConfigException
parent - The parent message to override values of.overrides - The message override values.ConfigException - If message overriding failedpublic OverrideConfigSupplier(@Nonnull ConfigSupplier<Message> parent, @Nonnull Map<String,String> overrides) throws ConfigException
parent - The parent message to override values of.overrides - The message override values.ConfigException - If message overriding failedpublic OverrideConfigSupplier(@Nonnull ConfigSupplier<Message> parent, @Nonnull Map<String,String> overrides, boolean strict) throws ConfigException
parent - The parent message to override values of.overrides - The message override values.strict - If config should be read strictly.ConfigException - If message overriding failedpublic OverrideConfigSupplier(@Nonnull Clock clock, @Nonnull ConfigSupplier<Message> parent, @Nonnull Map<String,String> overrides, boolean strict) throws ConfigException
clock - Clock used to time the updates.parent - The parent message to override values of.overrides - The message override values.strict - If config should be read strictly.ConfigException - If message overriding failedpublic String getName()
ConfigSupplierCopyright © 2015–2020 morimekta.net. All rights reserved.