We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
guide 哥我在复习 zookeeper 的时候发现它的 watcher 机制会在触发一次后就删除掉监听器,也就是说现在只能对节点的一次改变进行监听,第二次就不生效了。 目前有两种解决方案:
PathChildrenCacheListener pathChildrenCacheListener = (curatorFramework, pathChildCacheEvent) -> { // List<String> serviceAddresses = curatorFramework.getChildren().forPath(servicePath); // SERVICE_ADDRESS_MAP.put(rpcServiceName, serviceAddresses); // 删除缓存以便下次从 zookeeper 拉取最新数据 SERVICE_ADDRESS_MAP.remove(rpcServiceName); };
The text was updated successfully, but these errors were encountered:
CuratorFramework好像可以反复注册监听器
Sorry, something went wrong.
No branches or pull requests
guide 哥我在复习 zookeeper 的时候发现它的 watcher 机制会在触发一次后就删除掉监听器,也就是说现在只能对节点的一次改变进行监听,第二次就不生效了。
目前有两种解决方案:
The text was updated successfully, but these errors were encountered: