Currently, I am using Zookeeper for sharing configurations between different JVMs running on different nodes. In one of the node, the thread is waiting for some data to be written to specific zookeeper path and I have added watcher too to look out for any changes. On the other node, thread is writing data to that path and as soon as data is written, this thread should interrupt the waiting thread and start executing the remaining process.
For this, I have implemented watcher. As the thread is writing data to certain path, the watcher is being called and i get to see the log info. But the other thread (the one which is waiting) watcher is not getting called. I am not able to track why I am getting this issue.
I want to know that if its possible what I am trying to do? If not, any help with sharing CountDownLatch between above mentioned threads will be appreciated.
Thanks!