gpt4 book ai didi

io.fabric8.zookeeper.utils.ZooKeeperUtils.getSubstitutedPath()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 11:36:40 37 4
gpt4 key购买 nike

本文整理了Java中io.fabric8.zookeeper.utils.ZooKeeperUtils.getSubstitutedPath()方法的一些代码示例,展示了ZooKeeperUtils.getSubstitutedPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.getSubstitutedPath()方法的具体详情如下:
包路径:io.fabric8.zookeeper.utils.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:getSubstitutedPath

ZooKeeperUtils.getSubstitutedPath介绍

暂无

代码示例

代码示例来源:origin: io.fabric8.runtime/fabric8-runtime-container-tomcat-registration

@Override
  public String getIp() {
    try {
      return ZooKeeperUtils.getSubstitutedPath(curator.get(), CONTAINER_IP.getPath(runtimeIdentity));
    } catch (Exception e) {
      throw FabricException.launderThrowable(e);
    }
  }
};

代码示例来源:origin: jboss-fuse/fabric8

@Override
public URI getMavenRepoURI() {
  assertValid();
  URI uri = URI.create(getDefaultRepo());
  try {
    if (exists(curator.get(), ZkPath.MAVEN_PROXY.getPath("download")) != null) {
      List<String> children = getChildren(curator.get(), ZkPath.MAVEN_PROXY.getPath("download"));
      if (children != null && !children.isEmpty()) {
        Collections.sort(children);
        String mavenRepo = getSubstitutedPath(curator.get(), ZkPath.MAVEN_PROXY.getPath("download") + "/" + children.get(0));
        if (mavenRepo != null && !mavenRepo.endsWith("/")) {
          mavenRepo += "/";
        }
        uri = new URI(mavenRepo);
      }
    }
  } catch (Exception e) {
    //On exception just return uri.
  }
  return uri;
}

代码示例来源:origin: jboss-fuse/fabric8

@Override
public URI getMavenRepoUploadURI() {
  assertValid();
  URI uri = URI.create(getDefaultRepo());
  try {
    if (exists(curator.get(), ZkPath.MAVEN_PROXY.getPath("upload")) != null) {
      List<String> children = getChildren(curator.get(), ZkPath.MAVEN_PROXY.getPath("upload"));
      if (children != null && !children.isEmpty()) {
        Collections.sort(children);

        String mavenRepo = getSubstitutedPath(curator.get(), ZkPath.MAVEN_PROXY.getPath("upload") + "/" + children.get(0));
        if (mavenRepo != null && !mavenRepo.endsWith("/")) {
          mavenRepo += "/";
        }
        uri = new URI(mavenRepo);
      }
    }
  } catch (Exception e) {
    //On exception just return uri.
  }
  return uri;
}

代码示例来源:origin: jboss-fuse/fabric8

try {
  if (substituted) {
    return getSubstitutedPath(curator.get(), getAttributePath(containerId, attribute));
  } else {
    return getStringData(curator.get(), getAttributePath(containerId, attribute));

代码示例来源:origin: jboss-fuse/fabric8

String mavenRepo = "";
try {
  mavenRepo = getSubstitutedPath(curator.get(), ZkPath.MAVEN_PROXY.getPath("download") + "/" + child);
} catch (Exception e){
  LOGGER.warn("No znodes found under path: [{}]", ZkPath.MAVEN_PROXY.getPath("download"), e);

代码示例来源:origin: jboss-fuse/fabric8

List<Profile> memberProfiles = new ArrayList<>();
for (String container : containers) {
  String ip = getSubstitutedPath(obtainValid(curator), ZkPath.CONTAINER_IP.getPath(container));
    minimumPort = getSubstitutedPath(obtainValid(curator), ZkPath.CONTAINER_PORT_MIN.getPath(container));
    maximumPort = getSubstitutedPath(obtainValid(curator), ZkPath.CONTAINER_PORT_MAX.getPath(container));
    bindAddress = getSubstitutedPath(obtainValid(curator), ZkPath.CONTAINER_BINDADDRESS.getPath(container));

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com