java.lang.Object
io.helidon.config.AbstractSource
io.helidon.config.AbstractConfigSource
io.helidon.config.etcd.EtcdConfigSource
- All Implemented Interfaces:
- ConfigSource,- ParsableSource,- PollableSource<Long>,- Source,- WatchableSource<EtcdConfigSourceBuilder.EtcdEndpoint>,- Supplier<ConfigSource>
public class EtcdConfigSource
extends AbstractConfigSource
implements PollableSource<Long>, WatchableSource<EtcdConfigSourceBuilder.EtcdEndpoint>, ParsableSource
A config source which loads a configuration document from Etcd.
 
 Config source is initialized by EtcdConfigSourceBuilder.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.helidon.config.spi.ParsableSourceParsableSource.Builder<B extends ParsableSource.Builder<B>>Nested classes/interfaces inherited from interface io.helidon.config.spi.PollableSourcePollableSource.Builder<T extends PollableSource.Builder<T>>Nested classes/interfaces inherited from interface io.helidon.config.spi.SourceSource.Builder<B extends Source.Builder<B>>Nested classes/interfaces inherited from interface io.helidon.config.spi.WatchableSourceWatchableSource.Builder<B extends WatchableSource.Builder<B,T>, T> 
- 
Method SummaryModifier and TypeMethodDescriptionstatic EtcdConfigSourceBuilderbuilder()Create a new fluent API builder for etcd.A change watcher of this source, if it implementsWatchableSourceand has one configured.static EtcdConfigSourceCreate a new instance from configuration.static EtcdConfigSourcecreate(URI uri, String key, EtcdConfigSourceBuilder.EtcdApi api) Create a configured instance with the provided options.booleanisModified(Long stamp) This method is invoked to check if this source has changed.load()Loads the underlying source data.Media type if on eis configured for parsing content ofParsableSource.parser()Config parser if one is configured to use for parsing content ofParsableSource.A polling strategy of this source, if it implementsPollableSourceand has one configured.target()The target of this source.Target type as supported by this source.protected Stringuid()Returns universal id of source to be used to constructAbstractSource.description().Methods inherited from class io.helidon.config.AbstractConfigSourcetoStringMethods inherited from class io.helidon.config.AbstractSourcedescription, optional, retryPolicyMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.config.spi.ConfigSourceget, initMethods inherited from interface io.helidon.config.spi.ParsableSourcerelativeResolverMethods inherited from interface io.helidon.config.spi.Sourcedescription, exists, optional, retryPolicy
- 
Method Details- 
uidDescription copied from class:AbstractSourceReturns universal id of source to be used to constructAbstractSource.description().- Overrides:
- uidin class- AbstractSource
- Returns:
- universal id of source
 
- 
parserDescription copied from class:AbstractConfigSourceConfig parser if one is configured to use for parsing content ofParsableSource. If one is not configured on a source (default), a parser is chosen based onAbstractConfigSource.mediaType().- Specified by:
- parserin interface- ParsableSource
- Overrides:
- parserin class- AbstractConfigSource
- Returns:
- a configured parser, or empty if one should be chosen from media type (or if this is not a parsable source)
 
- 
mediaTypeDescription copied from class:AbstractConfigSourceMedia type if on eis configured for parsing content ofParsableSource. If there is none configured (default), a parser is chosen based onConfigParser.Content.mediaType()- media type detected during load of data.- Specified by:
- mediaTypein interface- ParsableSource
- Overrides:
- mediaTypein class- AbstractConfigSource
- Returns:
- configured media type or empty if none configured
 
- 
pollingStrategyDescription copied from class:AbstractSourceA polling strategy of this source, if it implementsPollableSourceand has one configured.- Specified by:
- pollingStrategyin interface- PollableSource<Long>
- Overrides:
- pollingStrategyin class- AbstractSource
- Returns:
- polling strategy if any configured
 
- 
changeWatcherDescription copied from class:AbstractSourceA change watcher of this source, if it implementsWatchableSourceand has one configured.- Specified by:
- changeWatcherin interface- WatchableSource<EtcdConfigSourceBuilder.EtcdEndpoint>
- Overrides:
- changeWatcherin class- AbstractSource
- Returns:
- change watcher if any configured
 
- 
targetDescription copied from interface:WatchableSourceThe target of this source.- Specified by:
- targetin interface- WatchableSource<EtcdConfigSourceBuilder.EtcdEndpoint>
- Returns:
- target this source is configured with, never null
 
- 
targetTypeDescription copied from interface:WatchableSourceTarget type as supported by this source.- Specified by:
- targetTypein interface- WatchableSource<EtcdConfigSourceBuilder.EtcdEndpoint>
- Returns:
- class of the target, by default used for WatchableSource.target()
 
- 
isModifiedDescription copied from interface:PollableSourceThis method is invoked to check if this source has changed.- Specified by:
- isModifiedin interface- PollableSource<Long>
- Parameters:
- stamp- the stamp of the last loaded content
- Returns:
- trueif the current data of this config source differ from the loaded data, including cases when the source has disappeared
 
- 
loadDescription copied from interface:ParsableSourceLoads the underlying source data. This method is only called when the sourceSource.exists().The method can be invoked repeatedly, for example during retries. In case the underlying data is gone or does not exist, return an empty optional. - Specified by:
- loadin interface- ParsableSource
- 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
 
- 
createCreate a configured instance with the provided options.- Parameters:
- uri- Remote etcd URI
- key- key the configuration is associated with
- api- api version
- Returns:
- a new etcd config source
 
- 
createCreate a new instance from configuration.- Parameters:
- metaConfig- meta configuration to load config source from
- Returns:
- configured source instance
 
- 
builderCreate a new fluent API builder for etcd.- Returns:
- a new builder
 
 
-