- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.alibaba.otter.canal.common.zookeeper.ZkClientx.createPersistentSequential()
方法的一些代码示例,展示了ZkClientx.createPersistentSequential()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkClientx.createPersistentSequential()
方法的具体详情如下:
包路径:com.alibaba.otter.canal.common.zookeeper.ZkClientx
类名称:ZkClientx
方法名:createPersistentSequential
[英]Create a persistent Sequential node.
[中]创建一个持久的顺序节点。
代码示例来源:origin: alibaba/canal
/**
* Create a persistent Sequential node.
*
* @param path
* @param createParents if true all parent dirs are created as well and no
* {@link ZkNodeExistsException} is thrown in case the path already exists
* @throws ZkInterruptedException if operation was interrupted, or a
* required reconnection got interrupted
* @throws IllegalArgumentException if called from anything except the
* ZooKeeper event thread
* @throws ZkException if any ZooKeeper exception occurred
* @throws RuntimeException if any other exception occurs
*/
public String createPersistentSequential(String path, boolean createParents) throws ZkInterruptedException,
IllegalArgumentException, ZkException,
RuntimeException {
try {
return create(path, null, CreateMode.PERSISTENT_SEQUENTIAL);
} catch (ZkNoNodeException e) {
if (!createParents) {
throw e;
}
String parentDir = path.substring(0, path.lastIndexOf('/'));
createPersistent(parentDir, createParents);
return createPersistentSequential(path, createParents);
}
}
代码示例来源:origin: alibaba/canal
/**
* Create a persistent Sequential node.
*
* @param path
* @param data
* @param createParents if true all parent dirs are created as well and no
* {@link ZkNodeExistsException} is thrown in case the path already exists
* @throws ZkInterruptedException if operation was interrupted, or a
* required reconnection got interrupted
* @throws IllegalArgumentException if called from anything except the
* ZooKeeper event thread
* @throws ZkException if any ZooKeeper exception occurred
* @throws RuntimeException if any other exception occurs
*/
public String createPersistentSequential(String path, Object data, boolean createParents)
throws ZkInterruptedException,
IllegalArgumentException,
ZkException,
RuntimeException {
try {
return create(path, data, CreateMode.PERSISTENT_SEQUENTIAL);
} catch (ZkNoNodeException e) {
if (!createParents) {
throw e;
}
String parentDir = path.substring(0, path.lastIndexOf('/'));
createPersistent(parentDir, createParents);
return createPersistentSequential(path, data, createParents);
}
}
代码示例来源:origin: alibaba/canal
public Long addBatch(ClientIdentity clientIdentity, PositionRange positionRange) throws CanalMetaManagerException {
String path = ZookeeperPathUtils.getBatchMarkPath(clientIdentity.getDestination(),
clientIdentity.getClientId());
byte[] data = JsonUtils.marshalToByte(positionRange, SerializerFeature.WriteClassName);
String batchPath = zkClientx
.createPersistentSequential(path + ZookeeperPathUtils.ZOOKEEPER_SEPARATOR, data, true);
String batchIdString = StringUtils.substringAfterLast(batchPath, ZookeeperPathUtils.ZOOKEEPER_SEPARATOR);
return ZookeeperPathUtils.getBatchMarkId(batchIdString);
}
本文整理了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
我是一名优秀的程序员,十分优秀!