public abstract class AbstractDynamicConfiguration extends Object implements DynamicConfiguration
DynamicConfiguration| 限定符和类型 | 字段和说明 |
|---|---|
static long |
DEFAULT_THREAD_POOL_KEEP_ALIVE_TIME
Default keep alive time in milliseconds for threads in
ThreadPoolExecutor is 1 minute( 60 * 1000 ms) |
static String |
DEFAULT_THREAD_POOL_PREFIX |
static int |
DEFAULT_THREAD_POOL_SIZE |
static String |
GROUP_PARAM_NAME
The parameter name of group for config-center
|
static String |
PARAM_NAME_PREFIX |
static String |
THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME
The keep alive time in milliseconds for threads in
ThreadPoolExecutor |
static String |
THREAD_POOL_PREFIX_PARAM_NAME |
static String |
THREAD_POOL_SIZE_PARAM_NAME |
static String |
TIMEOUT_PARAM_NAME
The parameter name of timeout for config-center
|
DEFAULT_GROUP| 构造器和说明 |
|---|
AbstractDynamicConfiguration(String threadPoolPrefixName,
int threadPoolSize,
long keepAliveTime,
String group,
long timeout) |
AbstractDynamicConfiguration(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.
|
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.
|
String |
getDefaultGroup()
Get the default group for the operations
|
long |
getDefaultTimeout()
Get the default timeout for the operations in milliseconds
|
Object |
getInternalProperty(String key) |
boolean |
removeConfig(String key,
String group) |
void |
removeListener(String key,
String group,
ConfigurationListener listener)
Stops one listener from listening to value changes in the specified key.
|
addListener, getConfig, getConfigKeys, getDynamicConfiguration, getDynamicConfiguration, getProperties, getProperties, getRuleKey, publishConfig, publishConfig, removeListenercontainsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString, toBooleanObjectpublic static final String THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME
ThreadPoolExecutorpublic static final String GROUP_PARAM_NAME
public static final String TIMEOUT_PARAM_NAME
public static final int DEFAULT_THREAD_POOL_SIZE
public static final long DEFAULT_THREAD_POOL_KEEP_ALIVE_TIME
ThreadPoolExecutor is 1 minute( 60 * 1000 ms)public AbstractDynamicConfiguration(URL url)
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 final 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 Object getInternalProperty(String key)
getInternalProperty 在接口中 Configurationpublic final void close()
throws Exception
DynamicConfigurationclose 在接口中 AutoCloseableclose 在接口中 DynamicConfigurationExceptionpublic boolean removeConfig(String key, String group)
removeConfig 在接口中 DynamicConfigurationkey - the key to represent a configurationgroup - the group where the key belongs totrue if success, or falsepublic String getDefaultGroup()
DynamicConfigurationgetDefaultGroup 在接口中 DynamicConfigurationpublic long getDefaultTimeout()
DynamicConfigurationgetDefaultTimeout 在接口中 DynamicConfigurationCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.