zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narasimha Tadepalli <Narasimha.Tadepa...@pervasive.com>
Subject RE: getChildren question.
Date Wed, 14 Nov 2012 16:37:41 GMT
Hi Michi

Thanks a lot. That helped me a bit.

-Narasimha

-----Original Message-----
From: mutsuzaki@gmail.com [mailto:mutsuzaki@gmail.com] On Behalf Of Michi Mutsuzaki
Sent: Tuesday, November 13, 2012 2:30 PM
To: user@zookeeper.apache.org
Cc: zookeeper-user@hadoop.apache.org; dev@zookeeper.apache.org
Subject: Re: getChildren question.

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 <Narasimha.Tadepalli@pervasive.com>
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.

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.


Mime
View raw message