Class WatchConfiguration

java.lang.Object
io.micronaut.discovery.consul.watch.WatchConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@ConfigurationProperties("consul.client.watch") public class WatchConfiguration extends Object implements io.micronaut.core.util.Toggleable
Configuration for Consul Watcher.
Since:
4.6.0
Author:
LE GALL BenoƮt
  • Field Details

    • PREFIX

      public static final String PREFIX
      The prefix to use for Consul's watcher settings.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • IMPORTED_PATHS

      public static final String IMPORTED_PATHS
      Internal property used to carry importer-derived watch paths into the Consul watcher.
      Since:
      5.0.0
      See Also:
    • IMPORTED_FORMAT

      public static final String 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:
      isEnabled in interface io.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

      public Optional<List<String>> getImportedPaths()
      Returns:
      The explicit Consul KV paths supplied by config import metadata, if any.
      Since:
      5.0.0
    • setImportedPaths

      public void setImportedPaths(String importedPaths)
      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

      public Optional<String> getImportedFormat()
      Returns:
      The importer-derived Consul configuration format, if any.
      Since:
      5.0.0
    • setImportedFormat

      public void setImportedFormat(String importedFormat)
      Sets the Consul configuration format supplied by importer metadata.
      Parameters:
      importedFormat - The importer-derived Consul configuration format
      Since:
      5.0.0