本文整理了Java中org.apache.pulsar.zookeeper.ZooKeeperCache.invalidate()
方法的一些代码示例,展示了ZooKeeperCache.invalidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperCache.invalidate()
方法的具体详情如下:
包路径:org.apache.pulsar.zookeeper.ZooKeeperCache
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!