Class WatchConfiguration
java.lang.Object
io.micronaut.discovery.consul.watch.WatchConfiguration
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final StringInternal property used to carry the importer-derived Consul config format into the watcher.static final StringInternal property used to carry importer-derived watch paths into the Consul watcher.static final StringThe prefix to use for Consul's watcher settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetEnabled(boolean enabled) Sets whether Configuration watching is enabled.voidsetImportedFormat(String importedFormat) Sets the Consul configuration format supplied by importer metadata.voidsetImportedPaths(String importedPaths) Sets the explicit Consul KV paths supplied by importer metadata.
-
Field Details
-
PREFIX
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
IMPORTED_PATHS
Internal property used to carry importer-derived watch paths into the Consul watcher.- Since:
- 5.0.0
- See Also:
-
IMPORTED_FORMAT
Internal property used to carry the importer-derived Consul config format into the watcher.- Since:
- 5.0.0
- See Also:
-
-
Constructor Details
-
WatchConfiguration
public WatchConfiguration()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether Configuration watching is enabled. Default value (false).- Parameters:
enabled- True if it is enabled
-
getImportedPaths
-
setImportedPaths
Sets the explicit Consul KV paths supplied by importer metadata.- Parameters:
importedPaths- A comma-separated list of explicit Consul KV watch paths- Since:
- 5.0.0
-
getImportedFormat
-
setImportedFormat
Sets the Consul configuration format supplied by importer metadata.- Parameters:
importedFormat- The importer-derived Consul configuration format- Since:
- 5.0.0
-