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:
    • DEFAULT_MAX_RETRIES

      public static final Integer DEFAULT_MAX_RETRIES
      The default maxRetryAttempts value.
    • DEFAULT_RETRY_DELAY

      public static final Integer DEFAULT_RETRY_DELAY
      The default retryDelayMs value.
    • DEFAULT_KV_NOT_FOUND_LOG_LEVEL

      public static final org.slf4j.event.Level DEFAULT_KV_NOT_FOUND_LOG_LEVEL
      The default kvNotFoundLogLevel value.
  • 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
    • getMaxRetryAttempts

      @NonNull public @NonNull Integer getMaxRetryAttempts()
      Returns:
      Maximum number of retry attempts. Default to
      Since:
      4.7.2
    • setMaxRetryAttempts

      public void setMaxRetryAttempts(@NonNull @NonNull Integer maxRetryAttempts)
      Parameters:
      maxRetryAttempts - Maximum number of retry attempts.
      Since:
      4.7.2
    • getRetryDelayMs

      @NonNull public @NonNull Integer getRetryDelayMs()
      Returns:
      Delay in milliseconds between retry attempts. Default to
      Since:
      4.7.2
    • setRetryDelayMs

      public void setRetryDelayMs(@NonNull @NonNull Integer retryDelayMs)
      Parameters:
      retryDelayMs - Delay in milliseconds between retry attempts
      Since:
      4.7.2
    • getKvNotFoundLogLevel

      @NonNull public @NonNull org.slf4j.event.Level getKvNotFoundLogLevel()
      Returns:
      Level to use to log NOT_FOUND KeyValue. Default to Level.INFO
      Since:
      4.7.2
    • setKvNotFoundLogLevel

      public void setKvNotFoundLogLevel(@NonNull @NonNull org.slf4j.event.Level kvNotFoundLogLevel)
      Parameters:
      kvNotFoundLogLevel - Level to use to log NOT_FOUND KeyValue
      Since:
      4.7.2