public class FileConfiguration extends AbstractConfiguration<ConfigChangeListener>
DEFAULT_CONFIG_TIMEOUT| 构造器和说明 |
|---|
FileConfiguration()
Instantiates a new File configuration.
|
FileConfiguration(String name)
Instantiates a new File configuration.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConfigListener(String dataId,
ConfigChangeListener listener)
Add config listener.
|
String |
getConfig(String dataId,
String defaultValue,
long timeoutMills)
Gets config.
|
List<ConfigChangeListener> |
getConfigListeners(String dataId)
Gets config listeners.
|
String |
getTypeName()
Gets type name.
|
boolean |
putConfig(String dataId,
String content,
long timeoutMills)
Put config boolean.
|
boolean |
putConfigIfAbsent(String dataId,
String content,
long timeoutMills)
Put config if absent boolean.
|
boolean |
removeConfig(String dataId,
long timeoutMills)
Remove config boolean.
|
void |
removeConfigListener(String dataId,
ConfigChangeListener listener)
Remove config listener.
|
getBoolean, getBoolean, getBoolean, getConfig, getConfig, getConfig, getInt, getInt, getInt, getLong, getLong, getLong, putConfig, putConfigIfAbsent, removeConfigpublic FileConfiguration()
public FileConfiguration(String name)
name - the namepublic String getConfig(String dataId, String defaultValue, long timeoutMills)
ConfigurationdataId - the data iddefaultValue - the default valuetimeoutMills - the timeout millspublic boolean putConfig(String dataId, String content, long timeoutMills)
ConfigurationdataId - the data idcontent - the contenttimeoutMills - the timeout millspublic boolean putConfigIfAbsent(String dataId, String content, long timeoutMills)
ConfigurationdataId - the data idcontent - the contenttimeoutMills - the timeout millspublic boolean removeConfig(String dataId, long timeoutMills)
ConfigurationdataId - the data idtimeoutMills - the timeout millspublic void addConfigListener(String dataId, ConfigChangeListener listener)
ConfigurationdataId - the data idlistener - the listenerpublic void removeConfigListener(String dataId, ConfigChangeListener listener)
ConfigurationdataId - the data idlistener - the listenerpublic List<ConfigChangeListener> getConfigListeners(String dataId)
ConfigurationdataId - the data idpublic String getTypeName()
AbstractConfigurationgetTypeName 在类中 AbstractConfiguration<ConfigChangeListener>Copyright © 2019 Seata. All rights reserved.