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.
| Modifier and Type | Class and Description |
|---|---|
class |
ApolloDynamicConfiguration.ApolloListener |
DEFAULT_GROUPinterfaceLevelLogger| Modifier and Type | Method and Description |
|---|---|
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) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, 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 in interface AutoCloseableclose in interface DynamicConfigurationpublic void addListener(String key, String group, ConfigurationListener listener)
addListener in interface DynamicConfigurationpublic void removeListener(String key, String group, ConfigurationListener listener)
removeListener in interface DynamicConfigurationpublic String getConfig(String key, String group, long timeout) throws IllegalStateException
getConfig in interface DynamicConfigurationIllegalStateExceptionpublic String getProperties(String key, String group, long timeout) throws IllegalStateException
getProperties in interface DynamicConfigurationkey - default value is 'dubbo.properties', currently useless for Apollo.group - timeout - IllegalStateExceptionpublic String getInternalProperty(String key)
getInternalProperty in interface ConfigurationCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.