Class AbstractConfigSource
java.lang.Object
com.alipay.sofa.common.config.source.AbstractConfigSource
- All Implemented Interfaces:
ConfigSource
,Ordered
- Direct Known Subclasses:
ConfigSourceCacheWrapper
,SystemEnvConfigSource
,SystemPropertyConfigSource
- Version:
- : AbstractConfigSource.java, v 0.1 2020年10月21日 2:38 下午 zhaowang Exp $
- Author:
- zhaowang
-
Field Summary
Fields inherited from interface com.alipay.sofa.common.utils.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T> T
changeValueType
(String value, Class<T> targetType) abstract String
doGetConfig
(String key) <T> T
Get config by configKey.getEffectiveKey
(ConfigKey configKey) The actual effective key to get the value.getStringConfig
(ConfigKey key) Get the string value of keyabstract boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.alipay.sofa.common.config.ConfigSource
getName
-
Constructor Details
-
AbstractConfigSource
public AbstractConfigSource()
-
-
Method Details
-
getConfig
Description copied from interface:ConfigSource
Get config by configKey. If no value exists, return null or empty string- Specified by:
getConfig
in interfaceConfigSource
- Parameters:
key
- ConfigKey- Returns:
- value of key
-
getStringConfig
Description copied from interface:ConfigSource
Get the string value of key- Specified by:
getStringConfig
in interfaceConfigSource
- Parameters:
key
- ConfigKey- Returns:
- string value of key
-
getEffectiveKey
Description copied from interface:ConfigSource
The actual effective key to get the value.- Specified by:
getEffectiveKey
in interfaceConfigSource
- Parameters:
configKey
- ConfigKey- Returns:
-
changeValueType
-
doGetConfig
-
hasKey
-