public abstract class AbstractDynamicConfiguration extends Object implements DynamicConfiguration
DynamicConfiguration| Modifier and Type | Field and Description |
|---|---|
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 |
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 |
DEFAULT_GROUP| Constructor and Description |
|---|
AbstractDynamicConfiguration() |
AbstractDynamicConfiguration(String threadPoolPrefixName,
int threadPoolSize,
long keepAliveTime) |
AbstractDynamicConfiguration(URL url) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Object |
getInternalProperty(String key) |
void |
removeListener(String key,
String group,
ConfigurationListener listener)
Stops one listener from listening to value changes in the specified key.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, getConfig, getConfigKeys, getDefaultGroup, getDefaultTimeout, getDynamicConfiguration, getDynamicConfiguration, getProperties, getProperties, getRuleKey, publishConfig, publishConfig, removeListenercontainsKey, convert, getBoolean, getBoolean, getBoolean, getInt, getInt, getInteger, getProperty, getProperty, getString, getString, toBooleanObjectpublic static final String PARAM_NAME_PREFIX
public static final String THREAD_POOL_PREFIX_PARAM_NAME
public static final String DEFAULT_THREAD_POOL_PREFIX
public static final String THREAD_POOL_SIZE_PARAM_NAME
public static final String THREAD_POOL_KEEP_ALIVE_TIME_PARAM_NAME
ThreadPoolExecutorpublic 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()
public AbstractDynamicConfiguration(URL url)
public AbstractDynamicConfiguration(String threadPoolPrefixName, int threadPoolSize, long keepAliveTime)
public void addListener(String key, String group, ConfigurationListener listener)
DynamicConfigurationaddListener in interface 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 in interface 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 in interface 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 in interface Configurationpublic final void close()
throws Exception
DynamicConfigurationclose in interface AutoCloseableclose in interface DynamicConfigurationExceptionCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.