Package io.helidon.config.etcd
Class EtcdConfigSource
- java.lang.Object
-
- io.helidon.config.spi.AbstractSource<ConfigNode.ObjectNode,S>
-
- io.helidon.config.spi.AbstractConfigSource<S>
-
- io.helidon.config.spi.AbstractParsableConfigSource<Long>
-
- io.helidon.config.etcd.EtcdConfigSource
-
- All Implemented Interfaces:
Changeable<ConfigNode.ObjectNode>
,ConfigSource
,Source<ConfigNode.ObjectNode>
,AutoCloseable
,Supplier<ConfigSource>
public class EtcdConfigSource extends AbstractParsableConfigSource<Long>
A config source which loads a configuration document from Etcd.Config source is initialized by
EtcdConfigSourceBuilder
.- See Also:
EtcdConfigSourceBuilder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.helidon.config.spi.AbstractParsableConfigSource
AbstractParsableConfigSource.Builder<B extends AbstractParsableConfigSource.Builder<B,T>,T>
-
Nested classes/interfaces inherited from class io.helidon.config.spi.AbstractSource
AbstractSource.Data<D,S>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigParser.Content<Long>
content()
Returns config source content.static EtcdConfigSource
create(Config config)
Create a new instance from configuration.protected Optional<Long>
dataStamp()
Returns current stamp of data in config source.protected String
mediaType()
Returns source associated media type ornull
if unknown.protected String
uid()
Returns universal id of source to be used to constructAbstractSource.description()
.-
Methods inherited from class io.helidon.config.spi.AbstractParsableConfigSource
loadData, parser
-
Methods inherited from class io.helidon.config.spi.AbstractConfigSource
changes, configContext, init, processLoadedData
-
Methods inherited from class io.helidon.config.spi.AbstractSource
description, fireChangeEvent, isMandatory, load
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.config.spi.ConfigSource
get
-
Methods inherited from interface io.helidon.config.spi.Source
close, description, load
-
-
-
-
Method Detail
-
mediaType
protected String mediaType()
Description copied from class:AbstractParsableConfigSource
Returns source associated media type ornull
if unknown.- Overrides:
mediaType
in classAbstractParsableConfigSource<Long>
- Returns:
- source associated media type or
null
if unknown.
-
uid
protected String uid()
Description copied from class:AbstractSource
Returns universal id of source to be used to constructAbstractSource.description()
.- Overrides:
uid
in classAbstractSource<ConfigNode.ObjectNode,Long>
- Returns:
- universal id of source
-
dataStamp
protected Optional<Long> dataStamp()
Description copied from class:AbstractSource
Returns current stamp of data in config source.- Specified by:
dataStamp
in classAbstractSource<ConfigNode.ObjectNode,Long>
- Returns:
- current datastamp of data in config source
-
content
protected ConfigParser.Content<Long> content() throws ConfigException
Description copied from class:AbstractParsableConfigSource
Returns config source content.- Specified by:
content
in classAbstractParsableConfigSource<Long>
- Returns:
- config source content. Never returns
null
. - Throws:
ConfigException
- in case of loading of configuration from config source failed.
-
create
public static EtcdConfigSource create(Config config)
Create a new instance from configuration.- Parameters:
config
- configuration to load from- Returns:
- configured source instance
- See Also:
ConfigSources.load(Supplier[])
,ConfigSources.load(Config)
-
-