CURATOR-623: Add ConnectionStateListener for ChildrenCache (used by Queues) (#401)
authorJordan Zimmerman <jordan@jordanzimmerman.com>
Sun, 22 May 2022 01:58:58 +0000 (20:58 -0500)
committerGitHub <noreply@github.com>
Sun, 22 May 2022 01:58:58 +0000 (09:58 +0800)
commitd58aa73f4cc78325abb2ae0ffd95fd9cf0776541
tree5ec0fac9151c806ab0d2bf9250fda80402c4130e
parentf44ff8844f0727e155d7f8e8e6172757acc060cd
CURATOR-623: Add ConnectionStateListener for ChildrenCache (used by Queues) (#401)

ChildrenCache (used by Queues) didn't have a ConnectionStateListener. Thus, if a long network partition occurred the ZK instance would be recreated losing any set watcher and the ChildrenCache would fail to continue watching changes. Adding a ConnectionStateListener fixes this.
curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/ChildrenCache.java
curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestLongNetworkPartition.java [new file with mode: 0644]