-Data vs. Exists Watches
Ben Bangert 2012-09-09, 16:10
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?