|
|
-
watchers and multiple notificationsGopala Krishna Gundeboyin... 2012-11-29, 11:26
Hi All,
I am trying to understand the behavior of watches and need clarification on two things: Documentation says ( http://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#sc_WatchRememberThese ) "*Be prepared to handle the case where the znode changes multiple times between getting the event and setting the watch again. (You may not care, but at least realize it may happen.)*" 1. Does this mean, once I set the watch again I am guaranteed to receive one notification for all multiple events that I missed in the mean time immediately? Or do I get a notification only when there is a new event? 2. Let say I got an event, before start handling the event I set the watch again and got busy in the callback. Meanwhile I have multiple events. Are these events result into one notification or multiple notifications? In my system, I don't want to miss a notification at the same time I want to handle an event just once if there are multiple notifications triggered on it. Thanks in Advance! -gopala |