- 链接地址:https://blog.csdn.net/flashflight/article/details/70880920
- 链接标题:ZooKeeper源码解析(三):Watcher如何监控ZNode_readresponse()方法-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1021
文章浏览阅读1.5k次。Watcher是一个接口类,有一个接口方法:由用户来实现,后续我们会讲它如何配合ZooKeeper和ClientCnxn来监控节点。上图ZooKeeper中的watchManager实际上是ZKWatchManager,它实现了ClientWatchManager,内部有三个主要成员变量,dataWatches监控数据,比如ZooKeeper类的getData方法会触发该监_readresponse()方法
版权声明:本文发布于特牛生活网 内容均来源于互联网 如有侵权联系删除