网站介绍:文章浏览阅读120次。Watcher监听机制在创建zookeeper会话时会传入一个Watcher,里面有两个特别关键的类:KeeperState(连接状态)和EventType(事件类型)。如何拿到事件状态或类型?//获取事件的状态Event.KeeperState state = watchedEvent.getState(); //获取事件的状态//获取事件的类型Event.EventType type = watchedEvent.getType(); //获取事件的类型KeeperStateKeepe_zookeeper监听递归孙节 java
- 链接地址:https://blog.csdn.net/yangqian1794/article/details/115874677
- 链接标题:zookeeper04-Java Api(2)事件监听_zookeeper监听递归孙节 java-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:1470
- 网站标签:zookeeper监听递归孙节 java