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> configSources,
Map<Class<?>,org.eclipse.microprofile.config.spi.Converter<?>> converters) |
PayaraConfig(List<org.eclipse.microprofile.config.spi.ConfigSource> sources,
Map<Class<?>,org.eclipse.microprofile.config.spi.Converter<?>> converters,
long ttl) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<org.eclipse.microprofile.config.spi.ConfigSource> |
getConfigSources() |
<T> org.eclipse.microprofile.config.spi.Converter<T> |
getConverter(Class<T> propertyType) |
Set<Class<?>> |
getConverterTypes() |
<T> Optional<T> |
getOptionalValue(String propertyName,
Class<T> propertyType) |
Iterable<String> |
getPropertyNames() |
<T> T |
getValue(String propertyName,
Class<T> propertyType) |
<T> T |
getValue(String propertyName,
String cacheKey,
Long ttl,
String defaultValue,
Supplier<? extends org.eclipse.microprofile.config.spi.Converter<T>> converter) |
public PayaraConfig(List<org.eclipse.microprofile.config.spi.ConfigSource> configSources, Map<Class<?>,org.eclipse.microprofile.config.spi.Converter<?>> converters)
public <T> T getValue(String propertyName, Class<T> propertyType)
getValue in interface org.eclipse.microprofile.config.Configpublic <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType)
getOptionalValue 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.Configpublic <T> T getValue(String propertyName, String cacheKey, Long ttl, String defaultValue, Supplier<? extends org.eclipse.microprofile.config.spi.Converter<T>> converter)
public <T> org.eclipse.microprofile.config.spi.Converter<T> getConverter(Class<T> propertyType)
Copyright © 2020. All rights reserved.