public class CompositeDynamicConfiguration extends Object implements DynamicConfiguration
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
NAME |
DEFAULT_GROUPinterfaceLevelLogger| 构造器和说明 |
|---|
CompositeDynamicConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConfiguration(DynamicConfiguration configuration) |
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.
|
void |
close()
Close the configuration
|
String |
getConfig(String key,
String group,
long timeout)
Get the configuration mapped to the given key and the given group.
|
Set<DynamicConfiguration> |
getInnerConfigurations() |
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.
|
boolean |
publishConfig(String key,
String group,
String content)
Publish Config 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.
|
addListener, getConfig, getConfigItem, getDefaultGroup, getDefaultTimeout, getProperties, getRuleKey, publishConfig, publishConfigCas, removeConfig, removeListenercontainsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString, toBooleanObjectpublic void addConfiguration(DynamicConfiguration configuration)
public Set<DynamicConfiguration> getInnerConfigurations()
public 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 getProperties(String key, String group, long timeout) throws IllegalStateException
DynamicConfigurationgetProperties 在接口中 DynamicConfigurationIllegalStateExceptionpublic Object getInternalProperty(String key)
getInternalProperty 在接口中 Configurationpublic boolean publishConfig(String key, String group, String content) throws UnsupportedOperationException
DynamicConfigurationpublishConfig 在接口中 DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tocontent - the content of configurationtrue if success, or falseUnsupportedOperationException - If the under layer does not supportpublic void close()
throws Exception
DynamicConfigurationclose 在接口中 AutoCloseableclose 在接口中 DynamicConfigurationExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.