public class EtcdDynamicConfiguration extends Object implements DynamicConfiguration
DynamicConfiguration| 限定符和类型 | 类和说明 |
|---|---|
class |
EtcdDynamicConfiguration.EtcdConfigWatcher |
DEFAULT_GROUP| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListener(String key,
String group,
ConfigurationListener listener)
Register a configuration listener for a specified key
The listener only works for service governance purpose, so the target group would always be the value user
specifies at startup or 'dubbo' by default.
|
String |
getConfig(String key,
String group,
long timeout)
Get the configuration mapped to the given key and the given group.
|
String |
getConfigs(String key,
String group,
long timeout)
DynamicConfiguration.getConfig(String, String, long)
This method are mostly used to get a compound config file, such as a complete dubbo.properties file. |
Object |
getInternalProperty(String key) |
void |
removeListener(String key,
String group,
ConfigurationListener listener)
Stops one listener from listening to value changes in the specified key.
|
addListener, getConfig, getConfig, getConfigs, getDynamicConfiguration, removeListenercontainsKey, convert, getProperty, getProperty, getString, getStringpublic void addListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationaddListener 在接口中 DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerpublic void removeListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationremoveListener 在接口中 DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerpublic String getConfig(String key, String group, long timeout) throws IllegalStateException
DynamicConfigurationgetConfig 在接口中 DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs totimeout - timeout value for fetching the target configIllegalStateExceptionpublic String getConfigs(String key, String group, long timeout) throws IllegalStateException
DynamicConfigurationDynamicConfiguration.getConfig(String, String, long)
This method are mostly used to get a compound config file, such as a complete dubbo.properties file.getConfigs 在接口中 DynamicConfigurationIllegalStateExceptionpublic Object getInternalProperty(String key)
getInternalProperty 在接口中 ConfigurationCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.