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" <mtrave...@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

Reply via email to