public abstract class TreePathDynamicConfiguration extends AbstractDynamicConfiguration
DynamicConfiguration is like "tree-structure" path :
"file""zookeeper""consul"DynamicConfiguration,
AbstractDynamicConfiguration| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CONFIG_BASE_PATH_PARAM_NAME
The parameter name of URL for the config base path
|
static String |
CONFIG_ROOT_PATH_PARAM_NAME
The parameter name of URL for the config root path
|
static String |
DEFAULT_CONFIG_BASE_PATH
The default value of parameter of URL for the config base path
|
DEFAULT_THREAD_POOL_KEEP_ALIVE_TIME, DEFAULT_THREAD_POOL_PREFIX, DEFAULT_THREAD_POOL_SIZE, GROUP_PARAM_NAME, PARAM_NAME_PREFIX, THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME, THREAD_POOL_PREFIX_PARAM_NAME, THREAD_POOL_SIZE_PARAM_NAME, TIMEOUT_PARAM_NAMEDEFAULT_GROUP| 构造器和说明 |
|---|
TreePathDynamicConfiguration(String rootPath,
String threadPoolPrefixName,
int threadPoolSize,
long keepAliveTime,
String group,
long timeout) |
TreePathDynamicConfiguration(URL url) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
SortedSet<String> |
getConfigKeys(String group)
Get the config keys by the specified group
|
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.
|
close, getConfig, getDefaultGroup, getDefaultTimeout, getInternalProperty, removeConfigaddListener, getConfig, getDynamicConfiguration, getDynamicConfiguration, getProperties, getProperties, getRuleKey, publishConfig, removeListenercontainsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString, toBooleanObjectpublic static final String CONFIG_ROOT_PATH_PARAM_NAME
public static final String CONFIG_BASE_PATH_PARAM_NAME
public TreePathDynamicConfiguration(URL url)
public final boolean publishConfig(String key, String group, String content)
DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tocontent - the content of configurationtrue if success, or falsepublic final void addListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationaddListener 在接口中 DynamicConfigurationaddListener 在类中 AbstractDynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerpublic final void removeListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationremoveListener 在接口中 DynamicConfigurationremoveListener 在类中 AbstractDynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs tolistener - configuration listenerpublic final SortedSet<String> getConfigKeys(String group) throws UnsupportedOperationException
DynamicConfigurationgroup - the specified groupset of config keysUnsupportedOperationException - If the under layer does not supportCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.