gpt4 book ai didi

org.apache.pulsar.zookeeper.ZooKeeperCache.invalidate()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 02:09:31 26 4
gpt4 key购买 nike

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

ZooKeeperCache.invalidate介绍

暂无

代码示例

代码示例来源:origin: org.apache.pulsar/pulsar-zookeeper-utils

public void asyncInvalidate(String path) {
  backgroundExecutor.execute(() -> invalidate(path));
}

代码示例来源:origin: org.apache.pulsar/pulsar-zookeeper-utils

@Override
public void reloadCache(final String path) {
  try {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Reloading ZooKeeperDataCache at path {}", path);
    }
    cache.invalidate(path);
    Optional<Entry<T, Stat>> cacheEntry = cache.getData(path, this, this);
    if (!cacheEntry.isPresent()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Node [{}] does not exist", path);
      }
      return;
    }
    for (ZooKeeperCacheListener<T> listener : listeners) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Notifying listener {} at path {}", listener, path);
      }
      listener.onUpdate(path, cacheEntry.get().getKey(), cacheEntry.get().getValue());
      if (LOG.isDebugEnabled()) {
        LOG.debug("Notified listener {} at path {}", listener, path);
      }
    }
  } catch (Exception e) {
    LOG.warn("Reloading ZooKeeperDataCache failed at path: {}", path, e);
  }
}

代码示例来源:origin: org.apache.pulsar/pulsar-zookeeper-utils

@Override
public void reloadCache(final String path) {
  try {
    cache.invalidate(path);
    Set<String> children = cache.getChildren(path, this);
    LOG.info("reloadCache called in zookeeperChildrenCache for path {}", path);
    for (ZooKeeperCacheListener<Set<String>> listener : listeners) {
      listener.onUpdate(path, children, null);
    }
  } catch (KeeperException.NoNodeException nne) {
    LOG.debug("Node [{}] does not exist", nne.getPath());
  } catch (Exception e) {
    LOG.warn("Reloading ZooKeeperDataCache failed at path:{}", path);
  }
}

代码示例来源:origin: org.apache.pulsar/pulsar-broker

globalZkCache().invalidate(clusterPath);
  log.info("[{}] Updated cluster {}", clientAppId(), cluster);
} catch (KeeperException.NoNodeException e) {

代码示例来源:origin: org.apache.pulsar/pulsar-broker

globalZkCache().invalidate(tenantPath);
  log.info("[{}] updated tenant {}", clientAppId(), tenant);
} catch (RestException re) {

代码示例来源:origin: org.apache.pulsar/pulsar-broker

globalZkCache().invalidate(clusterPath);
  log.info("[{}] Successfully added peer-cluster {} for {}", clientAppId(), peerClusterNames, cluster);
} catch (KeeperException.NoNodeException e) {

代码示例来源:origin: org.apache.pulsar/pulsar-broker

deleteFailureDomain(clusterPath);
  globalZk().delete(clusterPath, -1);
  globalZkCache().invalidate(clusterPath);
  log.info("[{}] Deleted cluster {}", clientAppId(), cluster);
} catch (KeeperException.NoNodeException e) {

代码示例来源:origin: org.apache.pulsar/pulsar-broker

globalZkCache().invalidate(namespacePath);

代码示例来源:origin: org.apache.pulsar/pulsar-broker

try {
  globalZk().delete(path, -1);
  globalZkCache().invalidate(path);

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