| Package | Description |
|---|---|
| com.alibaba.nacos.api.config | |
| com.alibaba.nacos.api.config.listener |
| Modifier and Type | Method and Description |
|---|---|
void |
ConfigService.addListener(String dataId,
String group,
Listener listener)
Add a listener to the configuration, after the server modified the
configuration, the client will use the incoming listener callback.
|
String |
ConfigService.getConfigAndSignListener(String dataId,
String group,
long timeoutMs,
Listener listener)
Get config and register Listener
If you want to pull it yourself when the program starts to get the configuration for the first time,
and the registered Listener is used for future configuration updates, you can keep the original
code unchanged, just add the system parameter: enableRemoteSyncConfig = "true" ( But there is network overhead);
therefore we recommend that you use this interface directly
|
void |
ConfigService.removeListener(String dataId,
String group,
Listener listener)
Remove listener
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractListener
Listener Adapter,use default notify thread
|
class |
AbstractSharedListener
Shared Listener
|
Copyright © 2018–2019 Alibaba Group. All rights reserved.