Class ConfigSourceCacheWrapper
java.lang.Object
com.alipay.sofa.common.config.source.AbstractConfigSource
com.alipay.sofa.common.config.source.ConfigSourceCacheWrapper
- All Implemented Interfaces:
ConfigSource
,Ordered
- Version:
- : CacheConfigSourceWrapper.java, v 0.1 2021年12月20日 8:19 下午 zhaowang
- Author:
- zhaowang
-
Field Summary
Fields inherited from interface com.alipay.sofa.common.utils.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionConfigSourceCacheWrapper
(AbstractConfigSource delegate, long expireAfterSecond) ConfigSourceCacheWrapper
(AbstractConfigSource delegate, com.google.common.cache.CacheBuilder<String, String> cb) -
Method Summary
Methods inherited from class com.alipay.sofa.common.config.source.AbstractConfigSource
changeValueType, getConfig, getEffectiveKey, getStringConfig
-
Field Details
-
DEFAULT_MAX_SIZE
public static final int DEFAULT_MAX_SIZE- See Also:
-
-
Constructor Details
-
ConfigSourceCacheWrapper
public ConfigSourceCacheWrapper(AbstractConfigSource delegate, com.google.common.cache.CacheBuilder<String, String> cb) -
ConfigSourceCacheWrapper
-
-
Method Details
-
getName
- Returns:
- The name of ConfigSource
-
doGetConfig
- Specified by:
doGetConfig
in classAbstractConfigSource
-
hasKey
- Specified by:
hasKey
in classAbstractConfigSource
-
getOrder
public int getOrder()Description copied from interface:Ordered
Get the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startup
values).Same order values will result in arbitrary sort positions for the affected objects.
- Returns:
- the order value
- See Also:
-