- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.alibaba.wasp.zookeeper.ZKUtil.getDataAndWatch()
方法的一些代码示例,展示了ZKUtil.getDataAndWatch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKUtil.getDataAndWatch()
方法的具体详情如下:
包路径:com.alibaba.wasp.zookeeper.ZKUtil
类名称:ZKUtil
方法名:getDataAndWatch
[英]Get the data at the specified znode and set a watch. Returns the data and sets a watch if the node exists. Returns null and no watch is set if the node does not exist or there is an exception.
[中]在指定的znode获取数据并设置一个手表。如果节点存在,则返回数据并设置监视。返回null,如果节点不存在或存在异常,则不设置监视。
代码示例来源:origin: alibaba/wasp
/**
* Gets the current data in the unassigned node for the specified entityGroup
* name or fully-qualified path.
*
* <p>
* Returns null if the entityGroup does not currently have a node.
*
* <p>
* Sets a watch on the node if the node exists.
*
* @param zkw zk reference
* @param pathOrEntityGroupName fully-specified path or entityGroup name
* @return znode content
* @throws org.apache.zookeeper.KeeperException if unexpected zookeeper exception
*/
public static byte[] getData(ZooKeeperWatcher zkw, String pathOrEntityGroupName)
throws KeeperException {
String node = getPath(zkw, pathOrEntityGroupName);
return ZKUtil.getDataAndWatch(zkw, node);
}
代码示例来源:origin: alibaba/wasp
/**
* Gets the data of the node.
*
* <p>
* If the node is currently available, the most up-to-date known version of
* the data is returned. If the node is not currently available, null is
* returned.
* @param refresh whether to refresh the data by calling ZK directly.
* @return data of the node, null if unavailable
*/
public synchronized byte[] getData(boolean refresh) {
if (refresh) {
try {
this.data = ZKUtil.getDataAndWatch(watcher, node);
} catch (KeeperException e) {
abortable.abort("Unexpected exception handling getData", e);
}
}
return this.data;
}
代码示例来源:origin: alibaba/wasp
/**
* Gets the current data in the unassigned node for the specified entityGroup
* name or fully-qualified path.
*
* <p>
* Returns null if the entityGroup does not currently have a node.
*
* <p>
* Sets a watch on the node if the node exists.
*
* @param zkw zk reference
* @param pathOrEntityGroupName fully-specified path or entityGroup name
* @param stat object to populate the version.
* @return znode content
* @throws org.apache.zookeeper.KeeperException if unexpected zookeeper exception
*/
public static byte[] getDataAndWatch(ZooKeeperWatcher zkw,
String pathOrEntityGroupName, Stat stat) throws KeeperException {
String node = getPath(zkw, pathOrEntityGroupName);
return ZKUtil.getDataAndWatch(zkw, node, stat);
}
代码示例来源:origin: alibaba/wasp
@Override
public synchronized void nodeCreated(String path) {
if (!path.equals(node))
return;
try {
byte[] data = ZKUtil.getDataAndWatch(watcher, node);
if (data != null) {
this.data = data;
notifyAll();
} else {
nodeDeleted(path);
}
} catch (KeeperException e) {
abortable.abort("Unexpected exception handling nodeCreated event", e);
}
}
代码示例来源:origin: alibaba/wasp
try {
this.data = ZKUtil.getDataAndWatch(watcher, node);
} catch (KeeperException e) {
try {
this.data = ZKUtil.getDataAndWatch(watcher, node);
} catch (KeeperException e) {
LOG.warn("Unexpected exception handling blockUntilAvailable", e);
代码示例来源:origin: alibaba/wasp
try {
if (ZKUtil.watchAndCheckExists(watcher, node)) {
byte[] data = ZKUtil.getDataAndWatch(watcher, node);
if (data != null) {
this.data = data;
代码示例来源:origin: alibaba/wasp
byte[] bytes = ZKUtil.getDataAndWatch(this.watcher,
this.watcher.getMasterAddressZNode());
if (bytes == null) {
代码示例来源:origin: alibaba/wasp
existingBytes = ZKUtil.getDataAndWatch(zkw, node);
} catch (KeeperException.NoNodeException nne) {
return false;
代码示例来源:origin: alibaba/wasp
String nodeName = ZKAssign.getNodeName(zkw, entityGroup
.getEntityGroupInfo().getEncodedName());
ZKUtil.getDataAndWatch(zkw, nodeName, stat);
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign类的一些代码示例,展示了ZKAssign类的具体用法。这些代码示例主要来源于Github/Stackoverf
本文整理了Java中com.alibaba.wasp.zookeeper.ZKUtil类的一些代码示例,展示了ZKUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflow/
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher类的一些代码示例,展示了ZooKeeperWatcher类的具体用法。这些代码示例主要来源于G
我有一个函数可以创建一个窗口 - 一个 TOPMOST 窗口。 所以 - 我可以运行这个: Get-WindowByProcessTitle *chrome* |置顶 注意这里的参数是一个进程名称("
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.getMasterAddressZNode()方法的一些代码示例,展示了ZooKeeperW
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.sync()方法的一些代码示例,展示了ZooKeeperWatcher.sync()的具体用
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.()方法的一些代码示例,展示了ZooKeeperWatcher.()的具体用法。这些代码示例
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.close()方法的一些代码示例,展示了ZooKeeperWatcher.close()的具
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.getRecoverableZooKeeper()方法的一些代码示例,展示了ZooKeepe
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.transitionNode()方法的一些代码示例,展示了ZKAssign.transitionNode()
本文整理了Java中com.alibaba.wasp.zookeeper.ZKUtil.deleteNodeFailSilent()方法的一些代码示例,展示了ZKUtil.deleteNodeFail
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.getData()方法的一些代码示例,展示了ZKAssign.getData()的具体用法。这些代码示例主要
本文整理了Java中com.alibaba.wasp.zookeeper.ZKUtil.listChildrenAndWatchForNewChildren()方法的一些代码示例,展示了ZKUtil.
本文整理了Java中com.alibaba.wasp.zookeeper.ZooKeeperWatcher.registerListener()方法的一些代码示例,展示了ZooKeeperWatche
本文整理了Java中com.alibaba.wasp.zookeeper.ZKUtil.getDataAndWatch()方法的一些代码示例,展示了ZKUtil.getDataAndWatch()的具
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.transitionNodeOpened()方法的一些代码示例,展示了ZKAssign.transition
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.createNodeClosing()方法的一些代码示例,展示了ZKAssign.createNodeClo
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.getNodeName()方法的一些代码示例,展示了ZKAssign.getNodeName()的具体用法。
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.deleteNode()方法的一些代码示例,展示了ZKAssign.deleteNode()的具体用法。这些
本文整理了Java中com.alibaba.wasp.zookeeper.ZKAssign.deleteAllNodes()方法的一些代码示例,展示了ZKAssign.deleteAllNodes()
我是一名优秀的程序员,十分优秀!