public class PayaraConfig extends Object implements org.eclipse.microprofile.config.Config
Config.
This implementation usually caches values for 1 min to avoid resolving and converting values each time
getValue(String, Class) is called. This cache can be bypassed by constructing the PayaraConfig with
a TTL of zero (or negative).| Constructor and Description |
|---|
PayaraConfig(List<org.eclipse.microprofile.config.spi.ConfigSource> sources,
Map<Class<?>,org.eclipse.microprofile.config.spi.Converter<?>> converters,
long defaultCacheDurationSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache() |
long |
getCacheDurationSeconds() |
Iterable<org.eclipse.microprofile.config.spi.ConfigSource> |
getConfigSources() |
org.eclipse.microprofile.config.ConfigValue |
getConfigValue(String propertyName) |
protected ConfigValueImpl |
getConfigValue(String propertyName,
String cacheKey,
Long ttl,
String defaultValue) |
<T> Optional<org.eclipse.microprofile.config.spi.Converter<T>> |
getConverter(Class<T> propertyType) |
Set<Class<?>> |
getConverterTypes() |
<T> Optional<T> |
getOptionalValue(String propertyName,
Class<T> propertyType) |
<T> Optional<List<T>> |
getOptionalValues(String propertyName,
Class<T> propertyType) |
String |
getProfile()
The Mp Config profile in use.
|
Iterable<String> |
getPropertyNames() |
<T> T |
getValue(String propertyName,
Class<T> propertyType) |
protected <T> T |
getValue(String propertyName,
String cacheKey,
Long ttl,
String defaultValue,
Supplier<Optional<org.eclipse.microprofile.config.spi.Converter<T>>> converter) |
<T> T |
unwrap(Class<T> type) |
public long getCacheDurationSeconds()
public <T> T getValue(String propertyName, Class<T> propertyType)
getValue in interface org.eclipse.microprofile.config.Configpublic org.eclipse.microprofile.config.ConfigValue getConfigValue(String propertyName)
getConfigValue in interface org.eclipse.microprofile.config.Configpublic <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType)
getOptionalValue in interface org.eclipse.microprofile.config.Configpublic <T> Optional<List<T>> getOptionalValues(String propertyName, Class<T> propertyType)
getOptionalValues in interface org.eclipse.microprofile.config.Configpublic Iterable<String> getPropertyNames()
getPropertyNames in interface org.eclipse.microprofile.config.Configpublic Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources()
getConfigSources in interface org.eclipse.microprofile.config.Configprotected <T> T getValue(String propertyName, String cacheKey, Long ttl, String defaultValue, Supplier<Optional<org.eclipse.microprofile.config.spi.Converter<T>>> converter)
protected ConfigValueImpl getConfigValue(String propertyName, String cacheKey, Long ttl, String defaultValue)
public <T> Optional<org.eclipse.microprofile.config.spi.Converter<T>> getConverter(Class<T> propertyType)
getConverter in interface org.eclipse.microprofile.config.Configpublic void clearCache()
public <T> T unwrap(Class<T> type)
unwrap in interface org.eclipse.microprofile.config.Configpublic String getProfile()
Copyright © 2021. All rights reserved.