- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.subscribeDataChanges()
方法的一些代码示例,展示了ZkClientx.subscribeDataChanges()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkClientx.subscribeDataChanges()
方法的具体详情如下:
包路径:com.alibaba.otter.canal.common.zookeeper.ZkClientx
类名称:ZkClientx
方法名:subscribeDataChanges
暂无
代码示例来源:origin: alibaba/canal
public void start() {
super.start();
String path = ZookeeperPathUtils.getDestinationClientRunning(this.destination, clientData.getClientId());
zkClient.subscribeDataChanges(path, dataListener);
initRunning();
}
代码示例来源:origin: alibaba/canal
public synchronized void start() {
super.start();
try {
processStart();
if (zkClient != null) {
// 如果需要尽可能释放instance资源,不需要监听running节点,不然即使stop了这台机器,另一台机器立马会start
String path = ZookeeperPathUtils.getDestinationServerRunning(destination);
zkClient.subscribeDataChanges(path, dataListener);
initRunning();
} else {
processActiveEnter();// 没有zk,直接启动
}
} catch (Exception e) {
logger.error("start failed", e);
// 没有正常启动,重置一下状态,避免干扰下一次start
stop();
}
}
代码示例来源:origin: alibaba/canal
public ClusterNodeAccessStrategy(String destination, ZkClientx zkClient){
this.destination = destination;
this.zkClient = zkClient;
childListener = new IZkChildListener() {
public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception {
initClusters(currentChilds);
}
};
dataListener = new IZkDataListener() {
public void handleDataDeleted(String dataPath) throws Exception {
runningAddress = null;
}
public void handleDataChange(String dataPath, Object data) throws Exception {
initRunning(data);
}
};
String clusterPath = ZookeeperPathUtils.getDestinationClusterRoot(destination);
this.zkClient.subscribeChildChanges(clusterPath, childListener);
initClusters(this.zkClient.getChildren(clusterPath));
String runningPath = ZookeeperPathUtils.getDestinationServerRunning(destination);
this.zkClient.subscribeDataChanges(runningPath, dataListener);
initRunning(this.zkClient.readData(runningPath, true));
}
代码示例来源:origin: com.alibaba.otter/canal.client
public void start() {
super.start();
String path = ZookeeperPathUtils.getDestinationClientRunning(this.destination, clientData.getClientId());
zkClient.subscribeDataChanges(path, dataListener);
initRunning();
}
代码示例来源:origin: com.alibaba.otter/canal.client
public ClusterNodeAccessStrategy(String destination, ZkClientx zkClient){
this.zkClient = zkClient;
childListener = new IZkChildListener() {
public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception {
initClusters(currentChilds);
}
};
dataListener = new IZkDataListener() {
public void handleDataDeleted(String dataPath) throws Exception {
runningAddress = null;
}
public void handleDataChange(String dataPath, Object data) throws Exception {
initRunning(data);
}
};
String clusterPath = ZookeeperPathUtils.getDestinationClusterRoot(destination);
this.zkClient.subscribeChildChanges(clusterPath, childListener);
initClusters(this.zkClient.getChildren(clusterPath));
String runningPath = ZookeeperPathUtils.getDestinationServerRunning(destination);
this.zkClient.subscribeDataChanges(runningPath, dataListener);
initRunning(this.zkClient.readData(runningPath, true));
}
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.unsubscribeStateChanges()方法的一些代码示例,展示了ZkClien
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.readData()方法的一些代码示例,展示了ZkClientX.readData()的具
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.retryUntilConnected()方法的一些代码示例,展示了ZkClientX.r
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.getChildren()方法的一些代码示例,展示了ZkClientX.getChildr
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.getZkClient()方法的一些代码示例,展示了ZkClientX.getZkClie
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.delete()方法的一些代码示例,展示了ZkClientX.delete()的具体用法。
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.createPersistent()方法的一些代码示例,展示了ZkClientX.crea
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.subscribeStateChanges()方法的一些代码示例,展示了ZkClientX
本文整理了Java中com.ucar.datalink.common.zookeeper.ZkClientX.create()方法的一些代码示例,展示了ZkClientX.create()的具体用法。
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.readData()方法的一些代码示例,展示了ZkClientx.readDa
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.unsubscribeDataChanges()方法的一些代码示例,展示了Zk
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.getChildren()方法的一些代码示例,展示了ZkClientx.get
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.writeData()方法的一些代码示例,展示了ZkClientx.write
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.delete()方法的一些代码示例,展示了ZkClientx.delete()
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.subscribeDataChanges()方法的一些代码示例,展示了ZkCl
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.createPersistent()方法的一些代码示例,展示了ZkClient
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.createPersistentSequential()方法的一些代码示例,展
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.create()方法的一些代码示例,展示了ZkClientx.create()
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.getZkClient()方法的一些代码示例,展示了ZkClientx.get
本文整理了Java中com.alibaba.otter.shared.common.utils.zookeeper.ZkClientx.createPersistent()方法的一些代码示例,展示了Z
我是一名优秀的程序员,十分优秀!