Phil Carns 2012-09-15, 01:23
-Re: question about lock recipe and watchers
Michi Mutsuzaki 2012-09-15, 05:32
On Fri, Sep 14, 2012 at 6:23 PM, Phil Carns <[EMAIL PROTECTED]> wrote:
> What happens to the watcher in this case? Is there any way to cancel a
> watcher, or is there an alternative way to accomplish the intent of the lock
> recipe algorithm without using an exists() watcher?
Right now the API doesn't provide a way to cancel watches, so the
watches will remain active until the session is closed.
You could set the watch using get() instead of exists(). These watches
get set if and only if the znode exists, and they get triggered when
the znode goes away.
Phil Carns 2012-09-15, 13:57
Robin Bate Boerop 2012-09-17, 18:00
Phil Carns 2012-09-17, 18:15
Robin Bate Boerop 2012-09-17, 18:35