类 TreePathDynamicConfiguration
- java.lang.Object
-
- org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration
-
- org.apache.dubbo.common.config.configcenter.TreePathDynamicConfiguration
-
- 所有已实现的接口:
AutoCloseable
,DynamicConfiguration
,Configuration
public abstract class TreePathDynamicConfiguration extends AbstractDynamicConfiguration
An abstract implementation ofDynamicConfiguration
is like "tree-structure" path :"file"
"zookeeper"
"consul"
- 从以下版本开始:
- 2.7.8
- 另请参阅:
DynamicConfiguration
,AbstractDynamicConfiguration
-
-
字段概要
字段 修饰符和类型 字段 说明 static String
CONFIG_BASE_PATH_PARAM_NAME
The parameter name of URL for the config base pathstatic String
CONFIG_ROOT_PATH_PARAM_NAME
The parameter name of URL for the config root pathstatic String
DEFAULT_CONFIG_BASE_PATH
The default value of parameter of URL for the config base path-
从类继承的字段 org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration
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_NAME
-
从接口继承的字段 org.apache.dubbo.common.config.configcenter.DynamicConfiguration
DEFAULT_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 groupboolean
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.-
从类继承的方法 org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration
close, getConfig, getDefaultGroup, getDefaultTimeout, getInternalProperty, removeConfig
-
从接口继承的方法 org.apache.dubbo.common.config.Configuration
containsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString
-
从接口继承的方法 org.apache.dubbo.common.config.configcenter.DynamicConfiguration
addListener, getConfig, getConfigItem, getProperties, getProperties, publishConfig, publishConfigCas, removeListener
-
-
-
-
方法详细资料
-
publishConfig
public final boolean publishConfig(String key, String group, String content)
从接口复制的说明:DynamicConfiguration
Publish Config mapped to the given key and the given group.- 参数:
key
- the key to represent a configurationgroup
- the group where the key belongs tocontent
- the content of configuration- 返回:
true
if success, orfalse
-
addListener
public final void addListener(String key, String group, ConfigurationListener listener)
从接口复制的说明:DynamicConfiguration
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. This method will only register listener, which means it will not trigger a notification that contains the current value.- 指定者:
addListener
在接口中DynamicConfiguration
- 覆盖:
addListener
在类中AbstractDynamicConfiguration
- 参数:
key
- the key to represent a configurationgroup
- the group where the key belongs tolistener
- configuration listener
-
removeListener
public final void removeListener(String key, String group, ConfigurationListener listener)
从接口复制的说明:DynamicConfiguration
Stops one listener from listening to value changes in the specified key.- 指定者:
removeListener
在接口中DynamicConfiguration
- 覆盖:
removeListener
在类中AbstractDynamicConfiguration
- 参数:
key
- the key to represent a configurationgroup
- the group where the key belongs tolistener
- configuration listener
-
getConfigKeys
public final SortedSet<String> getConfigKeys(String group) throws UnsupportedOperationException
从接口复制的说明:DynamicConfiguration
Get the config keys by the specified group- 参数:
group
- the specified group- 返回:
- the read-only non-null sorted
set
of config keys - 抛出:
UnsupportedOperationException
- If the under layer does not support
-
-