Class DiscoveryClientCacheConfiguration

java.lang.Object
io.micronaut.cache.CacheConfiguration
io.micronaut.cache.discovery.DiscoveryClientCacheConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@Named("discovery-client") @ConfigurationProperties("micronaut.caches.discovery-client") @Requires(property="micronaut.caches.discovery-client.enabled", notEquals="false") public class DiscoveryClientCacheConfiguration extends CacheConfiguration implements io.micronaut.core.util.Toggleable
A cache configuration for the Discovery client cache.
Since:
1.0
Author:
Graeme Rocher
  • Field Details

    • CACHE_NAME

      public static final String CACHE_NAME
      The prefix to use for all discovery client settings.
      See Also:
    • SETTING_ENABLED

      public static final String SETTING_ENABLED
      Configuration property name for enabled discovery cache client.
      See Also:
    • DEFAULT_ENABLED

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

    • DiscoveryClientCacheConfiguration

      public DiscoveryClientCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
      Parameters:
      applicationConfiguration - The application configuration
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Default value (true).
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      Whether the discovery client is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      Parameters:
      enabled - Enable or disable the discovery client