Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49501D04F for ; Sat, 13 Oct 2012 09:51:45 +0000 (UTC) Received: (qmail 86895 invoked by uid 500); 13 Oct 2012 09:51:44 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 86760 invoked by uid 500); 13 Oct 2012 09:51:44 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 86737 invoked by uid 99); 13 Oct 2012 09:51:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 09:51:43 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xekoukou@gmail.com designates 209.85.219.42 as permitted sender) Received: from [209.85.219.42] (HELO mail-oa0-f42.google.com) (209.85.219.42) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 09:51:36 +0000 Received: by mail-oa0-f42.google.com with SMTP id j1so3323520oag.15 for ; Sat, 13 Oct 2012 02:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=y0VTGvXOrUsyGDT7Xj9AmxpI9h+EnQPE11EMCC8PiKw=; b=KrwqkX3dpTGjHmt92l28R1U1Ci7Avck0yTvj6n8sjcltsa/KHoQ5qMOGAaTrMI+PIC q41W6zrpeSIqI7jSlaB2TKCkrU3WLX2e6T7v7RZzgaYuZkl6342G7/nXbT/8aJ+ySOIQ zBGG4ILXO/tVkLWRdARH79ZjmD8Iy6gI1fIYtXx6DfBb5iRf/TBFpND8qw/TLV1fF4dt p1p2uvqwJYt7y9GgkbcijJgC9QI/XNWGjERF9k52rImhYmYoGmULw7G9r/IpZTHg0QGc pmIDQ3dQNZgdTcNaX0Be/NvDYXk7whrrET09X0+C8a8arbI9rTG3uT8bMO9jJHVzUJLa zA6A== MIME-Version: 1.0 Received: by 10.60.0.194 with SMTP id 2mr5280308oeg.108.1350121875962; Sat, 13 Oct 2012 02:51:15 -0700 (PDT) Received: by 10.60.171.171 with HTTP; Sat, 13 Oct 2012 02:51:15 -0700 (PDT) In-Reply-To: References: Date: Sat, 13 Oct 2012 12:51:15 +0300 Message-ID: Subject: Re: Some questions about Watches From: Apostolis Xekoukoulotakis To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=e89a8fb2012ad1fcce04cbedbec1 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb2012ad1fcce04cbedbec1 Content-Type: text/plain; charset=ISO-8859-1 I had the exact same questions while reading the programmers guide. The guide should change to answer them more explicitly. 2012/10/13 Rakesh R > Hi Rohan, > > >>>>>>> 1. If my session has a default watcher w, and I make a call that > sets > another watcher w' for a specific znode, will both w and w' get called if > the znode changes? > > Default watcher w will only carry the zookeeper session states > Disconnected, Expired, SyncConnected, AuthFailed etc events. This Watcher > is notified when any state change occurs in the client for example, when > you successfully establish a connection, this watcher will receive a > SyncConnected event or if the client's session expires will trigger Expired > etc. > > w' is specially meant for watching the znode and here the default watcher > w will not receive notification on znode changes. But he will recieve state > changes as explained below. > > >>>>>>>2. If my session expires, on reconnect willl both w and w' be > notified > of the session expiry or just w? > > Here both w and w' will be notified and sequence will be first disconnect > event, then expiry event. > > > -Rakesh > ________________________________________ > From: Rohan Desai [desai.p.rohan@gmail.com] > Sent: Saturday, October 13, 2012 1:49 AM > To: user@zookeeper.apache.org > Subject: Some questions about Watches > > I had a couple questions about ZooKeeper watches that weren't immediately > clear from the programmer's guide > 1. If my session has a default watcher w, and I make a call that sets > another watcher w' for a specific znode, will both w and w' get called if > the znode changes? > 2. If my session expires, on reconnect willl both w and w' be notified > of the session expiry or just w? > -- Sincerely yours, Apostolis Xekoukoulotakis --e89a8fb2012ad1fcce04cbedbec1--