Hi Zhejiang, Asynccallback is the the call back that is called when your async call to exists completes.
The watcher (process event) is called only when the watch event happens. Like a node gets deleted in case of getChildren, a node data is updated. I hope this clarifies it. mahadev On 7/11/11 10:30 PM, "朱晨杰" <[email protected]> wrote: >Hi, everyone: > I'm new to zookeeper. I'm now reading through some demo and feel a >little >confused about the "Watcher". The code is: > > zk.exists(znode, true, this, null); > > so now I have two callback: *process(WatchedEvent event)* which is for >Watcher and *processResult(int rc, String path, Object ctx, Stat stat)* >which >is for AsyncCallback.StatCallback. So I want to know what's the difference >of these two callback and when they will be called? I can't find answers >in >API. Thanks! > >-- >Zhu Chenjie >Zhejiang University, China
