public class EtcdDynamicConfiguration extends Object implements DynamicConfiguration
DynamicConfiguration| Modifier and Type | Class and Description |
|---|---|
class |
EtcdDynamicConfiguration.EtcdConfigWatcher |
DEFAULT_GROUP| Modifier and Type | Method and Description |
|---|---|
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.
|
Object |
getInternalProperty(String key) |
String |
getProperties(String key,
String group,
long timeout)
This method are mostly used to get a compound config file, such as a complete dubbo.properties file.
|
String |
getRule(String key,
String group,
long timeout)
Get the governance rule mapped to the given key and the given group.
|
void |
removeListener(String key,
String group,
ConfigurationListener listener)
Stops one listener from listening to value changes in the specified key.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, getDynamicConfiguration, getProperties, getRule, getRuleKey, removeListenercontainsKey, convert, getProperty, getProperty, getString, getStringpublic void addListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationaddListener in interface 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 in interface DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerpublic String getRule(String key, String group, long timeout) throws IllegalStateException
DynamicConfigurationgetRule in interface DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs totimeout - timeout value for fetching the target configIllegalStateExceptionpublic String getProperties(String key, String group, long timeout) throws IllegalStateException
DynamicConfiguration#getConfig(String, String, long)getProperties in interface DynamicConfigurationIllegalStateExceptionpublic Object getInternalProperty(String key)
getInternalProperty in interface ConfigurationCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.