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.