public class ZKPublishManager extends BaseManager
config, curator
Constructor and Description |
---|
ZKPublishManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addSessionTimeoutHandler(org.apache.curator.framework.state.ConnectionStateListener listener) |
static ConfigPublishItem |
get(String clientId,
ConfigPath configPath) |
static ConfigPath |
getConfigPath() |
static Map<String,ConfigPublishItem> |
getConfigPublishItems(ConfigPath configPath) |
static org.apache.curator.framework.recipes.cache.NodeCache |
getNodeCache() |
static void |
set(String clientId,
ConfigPublishItem item,
ConfigPath configPath)
生成或修改配置项变更的监控节点
|
static void |
setConfigPath(ConfigPath configPath) |
static void |
startWatch(String clientId,
org.apache.curator.framework.recipes.cache.NodeCacheListener listener)
发起监控
|
static void |
stopWatch()
停止监控配置项发布
|
static void |
update(String clientId,
ConfigPublishItem item,
ConfigPath configPath)
仅修改配置项变更的监控节点
|
public static void set(String clientId, ConfigPublishItem item, ConfigPath configPath)
clientId
- 客户端Iditem
- 节点存储数据configPath
- 客户端对应的环境public static void update(String clientId, ConfigPublishItem item, ConfigPath configPath)
clientId
- item
- configPath
- public static ConfigPublishItem get(String clientId, ConfigPath configPath)
public static Map<String,ConfigPublishItem> getConfigPublishItems(ConfigPath configPath)
public static void startWatch(String clientId, org.apache.curator.framework.recipes.cache.NodeCacheListener listener)
clientId
- listener
- public static void stopWatch()
public static void addSessionTimeoutHandler(org.apache.curator.framework.state.ConnectionStateListener listener)
public static void setConfigPath(ConfigPath configPath)
public static ConfigPath getConfigPath()
public static org.apache.curator.framework.recipes.cache.NodeCache getNodeCache()
Copyright © 2006–2018 TinyGroup. All rights reserved.