Package io.micronaut.cache.discovery
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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CACHE_NAME
The prefix to use for all discovery client settings.static boolean
DEFAULT_ENABLED
The default enable value.static java.lang.String
SETTING_ENABLED
Configuration property name for enabled discovery cache client.-
Fields inherited from class io.micronaut.cache.CacheConfiguration
charset, DEFAULT_RECORD_STATS, DEFAULT_TESTMODE, PREFIX
-
-
Constructor Summary
Constructors Constructor Description DiscoveryClientCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled()
Default value (true).void
setEnabled(boolean enabled)
-
Methods inherited from class io.micronaut.cache.CacheConfiguration
getCacheName, getCharset, getExpireAfterAccess, getExpireAfterWrite, getInitialCapacity, getMaximumSize, getMaximumWeight, isRecordStats, isTestMode, setCharset, setExpireAfterAccess, setExpireAfterWrite, setInitialCapacity, setMaximumSize, setMaximumWeight, setRecordStats, setTestMode
-
-
-
-
Field Detail
-
CACHE_NAME
public static final java.lang.String CACHE_NAME
The prefix to use for all discovery client settings.- See Also:
- Constant Field Values
-
SETTING_ENABLED
public static final java.lang.String SETTING_ENABLED
Configuration property name for enabled discovery cache client.- 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()
Default value (true).- Specified by:
isEnabled
in interfaceio.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
-
-