类 NamingFuzzyWatchContext
java.lang.Object
com.alibaba.nacos.client.naming.cache.NamingFuzzyWatchContext
fuzzy wather context for a single group key pattern.
This class manages the context information for fuzzy listening, including environment name, task ID, data ID pattern, group, tenant, listener set, and other related information.
- 作者:
- stone-98
-
构造器概要
构造器构造器说明NamingFuzzyWatchContext(String envName, String groupKeyPattern) Constructor with environment name, data ID pattern, and group. -
方法概要
修饰符和类型方法说明booleanaddReceivedServiceKey(String serviceKey) add received service key.voidcreate a new future of this context.Get the environment name.Get the set of listeners associated with the context.Get the set of data IDs associated with the context.booleanGet the flag indicating whether the context is consistent with the server.booleanCheck if the context is discarded.booleanCheck if the context is initializing.voidMark initialization as complete and notify waiting threads.voidvoidbooleanremoveReceivedServiceKey(String serviceKey) remove received service key.voidremoveWatcher(com.alibaba.nacos.api.naming.listener.FuzzyWatchEventWatcher watcher) Remove a watcher from the context.voidsetConsistentWithServer(boolean isConsistentWithServer) voidsetDiscard(boolean discard) Set the flag indicating whether the context is discarded.voidsetEnvName(String envName) Set the environment name.
-
构造器详细资料
-
NamingFuzzyWatchContext
Constructor with environment name, data ID pattern, and group.- 参数:
envName- Environment namegroupKeyPattern- groupKeyPattern
-
-
方法详细资料
-
clearOverLimitTs
public void clearOverLimitTs() -
refreshOverLimitTs
public void refreshOverLimitTs() -
refreshSyncVersion
public void refreshSyncVersion() -
markInitializationComplete
public void markInitializationComplete()Mark initialization as complete and notify waiting threads. -
removeWatcher
public void removeWatcher(com.alibaba.nacos.api.naming.listener.FuzzyWatchEventWatcher watcher) Remove a watcher from the context.- 参数:
watcher- watcher to be removed
-
getEnvName
Get the environment name.- 返回:
- Environment name
-
setEnvName
Set the environment name.- 参数:
envName- Environment name to be set
-
getGroupKeyPattern
-
isConsistentWithServer
public boolean isConsistentWithServer()Get the flag indicating whether the context is consistent with the server.- 返回:
- AtomicBoolean indicating whether the context is consistent with the server
-
setConsistentWithServer
public void setConsistentWithServer(boolean isConsistentWithServer) -
isDiscard
public boolean isDiscard()Check if the context is discarded.- 返回:
- True if the context is discarded, otherwise false
-
setDiscard
public void setDiscard(boolean discard) Set the flag indicating whether the context is discarded.- 参数:
discard- True to mark the context as discarded, otherwise false
-
isInitializing
public boolean isInitializing()Check if the context is initializing.- 返回:
- True if the context is initializing, otherwise false
-
getReceivedServiceKeys
Get the set of data IDs associated with the context.- 返回:
- Set of data IDs
-
addReceivedServiceKey
add received service key.- 参数:
serviceKey- service key.- 返回:
-
removeReceivedServiceKey
remove received service key.- 参数:
serviceKey- service key.- 返回:
-
getFuzzyWatchEventWatcherWrappers
Get the set of listeners associated with the context.- 返回:
- Set of listeners
-
createNewFuture
create a new future of this context.- 返回:
-