类 TreePathDynamicConfiguration
- java.lang.Object
-
- org.apache.dubbo.common.config.configcenter.AbstractDynamicConfiguration
-
- org.apache.dubbo.common.config.configcenter.TreePathDynamicConfiguration
-
- 所有已实现的接口:
AutoCloseable,DynamicConfiguration,Configuration
- 直接已知子类:
FileSystemDynamicConfiguration
public abstract class TreePathDynamicConfiguration extends AbstractDynamicConfiguration
An abstract implementation ofDynamicConfigurationis like "tree-structure" path :"file""zookeeper""consul"
- 从以下版本开始:
- 2.7.8
- 另请参阅:
DynamicConfiguration,AbstractDynamicConfiguration
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringCONFIG_BASE_PATH_PARAM_NAMEThe parameter name of URL for the config base pathstatic StringCONFIG_ROOT_PATH_PARAM_NAMEThe parameter name of URL for the config root pathstatic StringDEFAULT_CONFIG_BASE_PATHThe 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)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddListener(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 groupbooleanpublishConfig(String key, String group, String content)Publish Config mapped to the given key and the given group.voidremoveListener(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, getProperties, getProperties, publishConfig, removeListener
-
-
-
-
方法详细资料
-
publishConfig
public final boolean publishConfig(String key, String group, String content)
从接口复制的说明:DynamicConfigurationPublish 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- 返回:
trueif success, orfalse
-
addListener
public final void addListener(String key, String group, ConfigurationListener listener)
从接口复制的说明:DynamicConfigurationRegister 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)
从接口复制的说明:DynamicConfigurationStops 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
从接口复制的说明:DynamicConfigurationGet the config keys by the specified group- 参数:
group- the specified group- 返回:
- the read-only non-null sorted
setof config keys - 抛出:
UnsupportedOperationException- If the under layer does not support
-
-