zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahadev Konar <maha...@yahoo-inc.com>
Subject Re: Ordering guarantees for async callbacks vs watchers
Date Thu, 11 Feb 2010 06:50:10 GMT
Hi martin,
 a call like getchildren(final String path, Watcher watcher,
ChildrenCallback cb, Object ctx)

Means that set a watch on this node for any further changes on the server. A
client will see the response to getchildren data before the above watch is

Hope that helps.


On 2/10/10 6:59 PM, "Martin Traverso" <mtraverso@gmail.com> wrote:

> What are the ordering guarantees for asynchronous callbacks vs watcher
> notifications (Java API) when both are used in the same call? E.g.,
> for getChildren(final String path, Watcher watcher, ChildrenCallback cb,
> Object ctx)
> Will the callback always be invoked before the watcher if there is a state
> change on the server at about the same time the call is made?
> I *think* that's what's implied by the documentation, but I'm not sure I'm
> reading it right:
> "All completions for asynchronous calls and watcher callbacks will be made
> in order, one at a time. The caller can do any processing they wish, but no
> other callbacks will be processed during that time." (
> http://hadoop.apache.org/zookeeper/docs/r3.2.2/zookeeperProgrammers.html#Java+
> Binding
> )
> Thanks!
> Martin

View raw message