public class ApolloDynamicConfiguration extends Object implements DynamicConfiguration
Apollo will be used for management of both governance rules and .properties files, by default, these two different kinds of data share the same namespace 'dubbo'. To gain better performance, we recommend separate them by giving namespace and group different values, for example:
Please see http://dubbo.apache.org/zh-cn/docs/user/configuration/config-center.html for details.
| 限定符和类型 | 类和说明 |
|---|---|
class |
ApolloDynamicConfiguration.ApolloListener |
DEFAULT_GROUPinterfaceLevelLogger| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListener(String key,
String group,
ConfigurationListener listener)
Since all governance rules will lay under dubbo group, this method now always uses the default dubboConfig and
ignores the group parameter.
|
void |
close() |
String |
getConfig(String key,
String group,
long timeout) |
String |
getInternalProperty(String key)
This method will be used by Configuration to get valid value at runtime.
|
String |
getProperties(String key,
String group,
long timeout)
Recommend specify namespace and group when using Apollo.
|
void |
removeListener(String key,
String group,
ConfigurationListener listener) |
addListener, getConfig, getConfigItem, getDefaultGroup, getDefaultTimeout, getProperties, getRuleKey, publishConfig, publishConfig, publishConfigCas, removeConfig, removeListenercontainsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString, toBooleanObjectpublic void close()
close 在接口中 AutoCloseableclose 在接口中 DynamicConfigurationpublic void addListener(String key, String group, ConfigurationListener listener)
addListener 在接口中 DynamicConfigurationpublic void removeListener(String key, String group, ConfigurationListener listener)
removeListener 在接口中 DynamicConfigurationpublic String getConfig(String key, String group, long timeout) throws IllegalStateException
getConfig 在接口中 DynamicConfigurationIllegalStateExceptionpublic String getProperties(String key, String group, long timeout) throws IllegalStateException
getProperties 在接口中 DynamicConfigurationkey - default value is 'dubbo.properties', currently useless for Apollo.group - timeout - IllegalStateExceptionpublic String getInternalProperty(String key)
getInternalProperty 在接口中 ConfigurationCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.