Hi Narasimha, It's an opaque object. Zookeeper client doesn't do anything with it, except that it's passed back to the callback. It's useful when you need to pass some kind of context to the callback.
--Michi On Tue, Nov 13, 2012 at 11:47 AM, Narasimha Tadepalli <[email protected]> wrote: > Does anybody have any idea about importance of object parameter in this below > method? What exactly it does if we provide some object? Documentation didn't > provide any details about this extra parameter. Appreciate your time. > > > > public void getChildren(String path, > > Watcher watcher, > > > AsyncCallback.ChildrenCallback<http://zookeeper.apache.org/doc/r3.4.4/api/org/apache/zookeeper/AsyncCallback.ChildrenCallback.html> > cb, > > Object ctx) > > http://zookeeper.apache.org/doc/r3.4.4/api/index.html > > > for example > > zk.getChildren("/node/child1/subchild", watcher, childrencallback, > Context.MESSAGE); > > > where Context is enum > > private enum Context { > > MESSAGE, > LOCK; > } > NOTICE: All information in and attached to this email may be proprietary, > confidential, privileged and otherwise protected from improper or erroneous > disclosure. If you are not the sender's intended recipient, you are not > authorized to intercept, read, print, retain, copy, forward, or disseminate > this message.
