@Named(value="discovery-client") @ConfigurationProperties(value="micronaut.caches.discovery-client") @Requires(property="micronaut.caches.discovery-client.enabled", notEquals="false") public class DiscoveryClientCacheConfiguration extends CacheConfiguration implements io.micronaut.core.util.Toggleable
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_NAME
The prefix to use for all discovery client settings.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static String |
SETTING_ENABLED
Configuration property name for enabled discovery cache client.
|
charset, DEFAULT_RECORD_STATS, DEFAULT_TESTMODE, PREFIX
Constructor and Description |
---|
DiscoveryClientCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled()
Default value (true).
|
void |
setEnabled(boolean enabled) |
getCacheName, getCharset, getExpireAfterAccess, getExpireAfterWrite, getInitialCapacity, getMaximumSize, getMaximumWeight, isRecordStats, isTestMode, setCharset, setExpireAfterAccess, setExpireAfterWrite, setInitialCapacity, setMaximumSize, setMaximumWeight, setRecordStats, setTestMode
public static final String CACHE_NAME
public static final String SETTING_ENABLED
public static final boolean DEFAULT_ENABLED
public DiscoveryClientCacheConfiguration(io.micronaut.runtime.ApplicationConfiguration applicationConfiguration)
applicationConfiguration
- The application configurationpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public void setEnabled(boolean enabled)
enabled
- Enable or disable the discovery client