Package io.micronaut.discovery.config
Class ConfigDiscoveryConfiguration
- java.lang.Object
-
- io.micronaut.discovery.config.ConfigDiscoveryConfiguration
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
public abstract class ConfigDiscoveryConfiguration extends java.lang.Object implements io.micronaut.core.util.Toggleable
Abstract class for common configuration discovery settings.- Since:
- 1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigDiscoveryConfiguration.Format
The format the configuration is stored in.
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_ENABLED
The default enable value.static java.lang.String
DEFAULT_PATH
The default path.static java.lang.String
PREFIX
The prefix to use for all Consul client config settings.
-
Constructor Summary
Constructors Constructor Description ConfigDiscoveryConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigDiscoveryConfiguration.Format
getFormat()
java.util.Optional<java.lang.String>
getPath()
boolean
isEnabled()
void
setEnabled(boolean enabled)
Default value (true).void
setFormat(ConfigDiscoveryConfiguration.Format format)
void
setPath(java.lang.String path)
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
The prefix to use for all Consul client config settings.- See Also:
- Constant Field Values
-
DEFAULT_PATH
public static final java.lang.String DEFAULT_PATH
The default path.- See Also:
- Constant Field Values
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enable value.- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
- Returns:
- Is distributed configuration enabled. True if it is.
-
setEnabled
public void setEnabled(boolean enabled)
Default value (true).- Parameters:
enabled
- Enable the distributed configuration
-
getPath
public java.util.Optional<java.lang.String> getPath()
- Returns:
- The path where the configuration is stored
-
setPath
public void setPath(java.lang.String path)
- Parameters:
path
- The path to store the configuration
-
getFormat
public ConfigDiscoveryConfiguration.Format getFormat()
- Returns:
- The configuration format
-
setFormat
public void setFormat(ConfigDiscoveryConfiguration.Format format)
- Parameters:
format
- The configuration format
-
-