zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bangert <...@groovie.org>
Subject Data vs. Exists Watches
Date Sun, 09 Sep 2012 16:10:10 GMT
I'm a bit curious about some of the implementation details for exists and data watches. In
the Jute files, C client, and Java client, watches are divided into:
- Data watches
- Exists watches
- Children watches

Yet the code treats data and exists watches identically, calling them at the same time. Which
makes sense of course given this is in the Zookeeper Programmers manual:
"It helps to think of ZooKeeper as maintaining two lists of watches: data watches and child
watches. getData() and exists() set data watches. getChildren() sets child watches."

So why do the implementations treat data and exists watches identically, but store them in
two different spots? Why do the Jute files differentiate? Is this to handle some possible
future difference between the two?

View raw message