gpt4 book ai didi

org.lilyproject.util.zookeeper.ZooKeeperItf.getChildren()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 20:54:49 27 4
gpt4 key购买 nike

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

ZooKeeperItf.getChildren介绍

暂无

代码示例

代码示例来源:origin: NGDATA/lilyproject

@Override
  public List<String> execute() throws KeeperException, InterruptedException {
    return zk.getChildren(lockPath, null);
  }
});

代码示例来源:origin: NGDATA/lilyproject

@Override
public List<String> getChildren(String path, Watcher watcher, Stat stat) throws KeeperException,
    InterruptedException {
  return wrapped.getChildren(path, watcher, stat);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
  public List<String> execute() throws KeeperException, InterruptedException {
    return zk.getChildren(lockPath, null);
  }
}));

代码示例来源:origin: NGDATA/lilyproject

@Override
public void getChildren(String path, boolean watch, Children2Callback cb, Object ctx) {
  wrapped.getChildren(path, watch, cb, ctx);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public List<String> getChildren(String path, Watcher watcher) throws KeeperException, InterruptedException {
  return wrapped.getChildren(path, watcher);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public List<String> getChildren(String path, boolean watch) throws KeeperException, InterruptedException {
  return wrapped.getChildren(path, watch);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public void getChildren(String path, Watcher watcher, ChildrenCallback cb, Object ctx) {
  wrapped.getChildren(path, watcher, cb, ctx);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public void getChildren(String path, boolean watch, ChildrenCallback cb, Object ctx) {
  wrapped.getChildren(path, watch, cb, ctx);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public List<String> getChildren(String path, boolean watch, Stat stat) throws KeeperException, InterruptedException {
  return wrapped.getChildren(path, watch, stat);
}

代码示例来源:origin: NGDATA/lilyproject

@Override
public void getChildren(String path, Watcher watcher, Children2Callback cb, Object ctx) {
  wrapped.getChildren(path, watcher, cb, ctx);
}

代码示例来源:origin: NGDATA/lilyproject

private void refresh() throws KeeperException, InterruptedException {
  List<String> addresses = zk.getChildren("/lily/repositoryNodes", watcher);
  Set<String> hostNames = new HashSet<String>();
  for (String address : addresses) {
    int colonPos = address.indexOf(":");
    String hostName = address.substring(0, colonPos);
    hostNames.add(hostName);
  }
  this.hostnames = Collections.unmodifiableSet(hostNames);
}

代码示例来源:origin: NGDATA/lilyproject

private Map<String, RepositoryDefinition> loadRepositories(boolean watch) throws KeeperException, InterruptedException {
  Map<String, RepositoryDefinition> repositories = new HashMap<String, RepositoryDefinition>();
  List<String> children = zk.getChildren(REPOSITORY_COLLECTION_PATH, watch ? zkWatcher : null);
  for (String child : children) {
    repositories.put(child, loadRepository(child, watch));
  }
  return repositories;
}

代码示例来源:origin: NGDATA/lilyproject

private List<String> getLilyNodes() throws KeeperException, InterruptedException {
  LilyNodesWatcher watcher = lilyNodesWatcher;
  if (watcher == null) {
    watcher = new LilyNodesWatcher();
  }
  List<String> lilyNodes = null;
  try {
    lilyNodes = zooKeeper.getChildren(LILY_NODES_PATH, watcher);
    lilyNodesWatcher = watcher;
  } catch (KeeperException e) {
    if (log.isDebugEnabled()) {
      log.debug("Failed getting lilyNodes from Zookeeper", e);
    }
    // The path does not exist yet.
    // Set the lilyNodesWatcher to null so that we retry
    // setting the watcher in the next iteration.
    lilyNodesWatcher = null;
  }
  return lilyNodes;
}

代码示例来源:origin: NGDATA/lilyproject

List<String> children = zk.getChildren(electionPath, watcher);

代码示例来源:origin: NGDATA/lilyproject

retry = false;
try {
  currentServers.addAll(zk.getChildren(nodesPath, true));
} catch (KeeperException.NoNodeException e) {

代码示例来源:origin: NGDATA/lilyproject

List<String> lilyServers = zk.getChildren("/lily/repositoryNodes", false);

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