public interface DynamicConfiguration extends Configuration
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_GROUP |
| Modifier and Type | Method and Description |
|---|---|
default void |
addListener(String key,
ConfigurationListener listener)
|
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.
|
static DynamicConfiguration |
getDynamicConfiguration()
Find DynamicConfiguration instance
|
default String |
getProperties(String key,
String group)
This method are mostly used to get a compound config file, such as a complete dubbo.properties file.
|
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.
|
default String |
getRule(String key,
String group)
Get the governance rule mapped to the given key and the given group
|
String |
getRule(String key,
String group,
long timeout)
Get the governance rule mapped to the given key and the given group.
|
static String |
getRuleKey(URL url)
The format is '{interfaceName}:[version]:[group]'
|
default void |
removeListener(String key,
ConfigurationListener listener)
|
void |
removeListener(String key,
String group,
ConfigurationListener listener)
Stops one listener from listening to value changes in the specified key.
|
containsKey, convert, getInternalProperty, getProperty, getProperty, getString, getStringstatic final String DEFAULT_GROUP
default void addListener(String key, ConfigurationListener listener)
key - the key to represent a configurationlistener - configuration listenerdefault void removeListener(String key, ConfigurationListener listener)
key - the key to represent a configurationlistener - configuration listenervoid addListener(String key, String group, ConfigurationListener listener)
key - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenervoid removeListener(String key, String group, ConfigurationListener listener)
key - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerdefault String getRule(String key, String group)
key - the key to represent a configurationgroup - the group where the key belongs toString getRule(String key, String group, long timeout) throws IllegalStateException
key - the key to represent a configurationgroup - the group where the key belongs totimeout - timeout value for fetching the target configIllegalStateExceptiondefault String getProperties(String key, String group) throws IllegalStateException
#getConfig(String, String)IllegalStateExceptionString getProperties(String key, String group, long timeout) throws IllegalStateException
#getConfig(String, String, long)IllegalStateExceptionstatic DynamicConfiguration getDynamicConfiguration()
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.