类 ConfigFuzzyWatchGroupKeyHolder
java.lang.Object
com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.notify.Event>
com.alibaba.nacos.common.notify.listener.SmartSubscriber
com.alibaba.nacos.client.config.impl.ConfigFuzzyWatchGroupKeyHolder
- 所有已实现的接口:
com.alibaba.nacos.common.lifecycle.Closeable
public class ConfigFuzzyWatchGroupKeyHolder
extends com.alibaba.nacos.common.notify.listener.SmartSubscriber
implements com.alibaba.nacos.common.lifecycle.Closeable
config fuzzy watch context holder.
- 作者:
- shiyiyue
-
构造器概要
构造器构造器说明ConfigFuzzyWatchGroupKeyHolder(ClientWorker.ConfigRpcTransportClient agent, String clientUuid) -
方法概要
修饰符和类型方法说明voidExecute fuzzy listen configuration changes.getFuzzyListenContext(String dataIdPattern, String groupPattern) Retrieves the FuzzyListenContext for the given data ID pattern and group.voidonEvent(com.alibaba.nacos.common.notify.Event event) registerFuzzyWatcher(String dataIdPattern, String groupPattern, com.alibaba.nacos.api.config.listener.FuzzyWatchEventWatcher fuzzyWatchEventWatcher) register fuzzy watcher.voidremoveFuzzyListenContext(String groupKeyPattern) Removes the fuzzy listen context for the specified data ID pattern and group.voidremoveFuzzyWatcher(String dataIdPattern, String groupPattern, com.alibaba.nacos.api.config.listener.FuzzyWatchEventWatcher watcher) Removes a fuzzy listen listener for the specified data ID pattern, group, and listener.voidshutdown()Deregistering it from the NotifyCenter.voidstart()start.从类继承的方法 com.alibaba.nacos.common.notify.listener.SmartSubscriber
ignoreExpireEvent, subscribeType从类继承的方法 com.alibaba.nacos.common.notify.listener.Subscriber
executor, scopeMatches
-
构造器详细资料
-
ConfigFuzzyWatchGroupKeyHolder
public ConfigFuzzyWatchGroupKeyHolder(ClientWorker.ConfigRpcTransportClient agent, String clientUuid)
-
-
方法详细资料
-
start
public void start()start. -
shutdown
public void shutdown()Deregistering it from the NotifyCenter.- 指定者:
shutdown在接口中com.alibaba.nacos.common.lifecycle.Closeable
-
removeFuzzyListenContext
Removes the fuzzy listen context for the specified data ID pattern and group.- 参数:
groupKeyPattern- The pattern of the data ID.
-
registerFuzzyWatcher
public ConfigFuzzyWatchContext registerFuzzyWatcher(String dataIdPattern, String groupPattern, com.alibaba.nacos.api.config.listener.FuzzyWatchEventWatcher fuzzyWatchEventWatcher) register fuzzy watcher.- 参数:
dataIdPattern- dataIdPattern.groupPattern- groupPattern.fuzzyWatchEventWatcher- fuzzyWatchEventWatcher.- 返回:
- ConfigFuzzyWatchContext
-
getFuzzyListenContext
Retrieves the FuzzyListenContext for the given data ID pattern and group.- 参数:
dataIdPattern- The data ID pattern.groupPattern- The group name pattern.- 返回:
- The corresponding FuzzyListenContext, or null if not found.
-
removeFuzzyWatcher
public void removeFuzzyWatcher(String dataIdPattern, String groupPattern, com.alibaba.nacos.api.config.listener.FuzzyWatchEventWatcher watcher) Removes a fuzzy listen listener for the specified data ID pattern, group, and listener.- 参数:
dataIdPattern- The pattern of the data ID.groupPattern- The group of the configuration.watcher- The listener to remove.- 抛出:
com.alibaba.nacos.api.exception.NacosException- If an error occurs while removing the listener.
-
executeConfigFuzzyListen
public void executeConfigFuzzyListen() throws com.alibaba.nacos.api.exception.NacosExceptionExecute fuzzy listen configuration changes.This method iterates through all fuzzy listen contexts and determines whether they need to be added or removed based on their consistency with the server and discard status. It then calls the appropriate method to execute the fuzzy listen operation.
- 抛出:
com.alibaba.nacos.api.exception.NacosException- If an error occurs during the execution of fuzzy listen configuration changes.
-
subscribeTypes
- 指定者:
subscribeTypes在类中com.alibaba.nacos.common.notify.listener.SmartSubscriber
-
onEvent
public void onEvent(com.alibaba.nacos.common.notify.Event event) - 指定者:
onEvent在类中com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.notify.Event>
-