本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.create()
方法的一些代码示例,展示了ZooKeeperUtils.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.create()
方法的具体详情如下:
包路径:io.fabric8.zookeeper.utils.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:create
暂无
代码示例来源:origin: io.fabric8/fabric-zookeeper
public static void create(CuratorFramework curator, String path) throws Exception {
create(curator, path, CreateMode.PERSISTENT);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public void create(String path) throws Exception {
ZooKeeperUtils.create(curator, path);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public String create(String path, CreateMode createMode) throws Exception {
return ZooKeeperUtils.create(curator, path, createMode);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public String create(String path, String data, CreateMode createMode) throws Exception {
return ZooKeeperUtils.create(curator, path, data, createMode);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public String create(String path, byte[] data, CreateMode createMode) throws Exception {
return ZooKeeperUtils.create(curator, path, data, createMode);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public static String create(CuratorFramework curator, String path, CreateMode createMode) throws Exception {
return create(curator, path, (byte[]) null, createMode);
}
代码示例来源:origin: jboss-fuse/fabric8
public void create(String path) throws Exception {
ZooKeeperUtils.create(curator, path);
}
代码示例来源:origin: jboss-fuse/fabric8
public String create(String path, CreateMode createMode) throws Exception {
return ZooKeeperUtils.create(curator, path, createMode);
}
代码示例来源:origin: jboss-fuse/fabric8
public static void create(CuratorFramework curator, String path) throws Exception {
create(curator, path, CreateMode.PERSISTENT);
}
代码示例来源:origin: jboss-fuse/fabric8
public static String create(CuratorFramework curator, String path, CreateMode createMode) throws Exception {
return create(curator, path, (byte[]) null, createMode);
}
代码示例来源:origin: jboss-fuse/fabric8
public String create(String path, byte[] data, CreateMode createMode) throws Exception {
return ZooKeeperUtils.create(curator, path, data, createMode);
}
代码示例来源:origin: io.fabric8/fabric-zookeeper
public static String create(CuratorFramework curator, String path, String data, CreateMode createMode) throws Exception {
return create(curator, path, data != null ? data.getBytes(UTF_8) : null, createMode);
}
代码示例来源:origin: io.fabric8/fabric-maven-proxy
private void register(String type) {
unregister(type);
try {
String mavenProxyUrl = "${zk:" + name + "/http}/maven/" + type + "/";
String parentPath = ZkPath.MAVEN_PROXY.getPath(type);
String path = parentPath + "/p_";
registeredProxies.get(type).add(create(curator.get(), path, mavenProxyUrl, CreateMode.EPHEMERAL_SEQUENTIAL));
} catch (Exception e) {
LOGGER.warn("Failed to register maven proxy.");
}
}
代码示例来源:origin: jboss-fuse/fabric8
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
delete(curator.get(), nodeAlive);
create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-wildfly-registration
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = ZooKeeperUtils.exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
ZooKeeperUtils.delete(curator.get(), nodeAlive);
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-tomcat-registration
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = ZooKeeperUtils.exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
ZooKeeperUtils.delete(curator.get(), nodeAlive);
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/embedded
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String karafName = sysprops.getProperty(SystemProperties.KARAF_NAME);
String nodeAlive = CONTAINER_ALIVE.getPath(karafName);
Stat stat = ZooKeeperUtils.exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
ZooKeeperUtils.delete(curator.get(), nodeAlive);
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-embedded
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = ZooKeeperUtils.exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
ZooKeeperUtils.delete(curator.get(), nodeAlive);
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric8-runtime-container-tomcat-registration
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = ZooKeeperUtils.exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
ZooKeeperUtils.delete(curator.get(), nodeAlive);
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
ZooKeeperUtils.create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
代码示例来源:origin: io.fabric8.runtime/fabric-runtime-container-karaf-registration
private void checkAlive() throws Exception {
RuntimeProperties sysprops = runtimeProperties.get();
String runtimeIdentity = sysprops.getRuntimeIdentity();
String nodeAlive = CONTAINER_ALIVE.getPath(runtimeIdentity);
Stat stat = exists(curator.get(), nodeAlive);
if (stat != null) {
if (stat.getEphemeralOwner() != curator.get().getZookeeperClient().getZooKeeper().getSessionId()) {
delete(curator.get(), nodeAlive);
create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
} else {
create(curator.get(), nodeAlive, CreateMode.EPHEMERAL);
}
}
内容来源于网络,如有侵权,请联系作者删除!