gpt4 book ai didi

io.fabric8.groups.internal.ZooKeeperGroup.clearAndRefresh()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 00:22:49 28 4
gpt4 key购买 nike

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

ZooKeeperGroup.clearAndRefresh介绍

[英]Clear out current data and begin a new query on the path
[中]清除当前数据并在路径上开始新的查询

代码示例

代码示例来源:origin: io.fabric8/fabric-groups

/**
 * Clear out current data and begin a new query on the path
 *
 * @throws Exception errors
 */
public void clearAndRefresh() throws Exception {
  clearAndRefresh(false, false);
}

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

/**
 * Clear out current data and begin a new query on the path
 *
 * @throws Exception errors
 */
public void clearAndRefresh() throws Exception {
  clearAndRefresh(false, false);
}

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

public void setGroup(final Group<CxfNodeState> group) throws Exception {
  this.group = group;
  group.add(new GroupListener<CxfNodeState>() {
    @Override
    public void groupEvent(Group<CxfNodeState> group, GroupEvent event) {
      onUpdate(group);
    }
  });
  if (group instanceof ZooKeeperGroup) {
    // trigger refresh synchronously so we have up to date state before being used by clients
    ((ZooKeeperGroup) group).clearAndRefresh(true, true);
  }
}

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

private void prunePartialState(final T ourState, final String pathId) throws Exception {
  if (ourState.uuid != null) {
    clearAndRefresh(true, true);
    List<ChildData<T>> children = new ArrayList<ChildData<T>>(currentData.values());
    for (ChildData<T> child : children) {
      if (ourState.uuid.equals(child.getNode().uuid) && !child.getPath().equals(pathId)) {
        LOG.debug("Deleting partially created znode: " + child.getPath());
        client.delete().guaranteed().forPath(child.getPath());
      }
    }
  }
}

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