Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 30600 invoked from network); 18 Mar 2010 22:58:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Mar 2010 22:58:23 -0000 Received: (qmail 95913 invoked by uid 500); 18 Mar 2010 22:58:23 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 95890 invoked by uid 500); 18 Mar 2010 22:58:23 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 95882 invoked by uid 99); 18 Mar 2010 22:58:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 22:58:23 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.176] (HELO mail-wy0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 22:58:16 +0000 Received: by wyf19 with SMTP id 19so1230783wyf.35 for ; Thu, 18 Mar 2010 15:57:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.177.82 with SMTP id c60mr657890wem.25.1268953075390; Thu, 18 Mar 2010 15:57:55 -0700 (PDT) In-Reply-To: References: <13a6b1401003180332r76353e53qf6141b5931424677@mail.gmail.com> Date: Thu, 18 Mar 2010 15:57:55 -0700 Message-ID: Subject: Re: Modify ZooKeeper Java client to hold weak references to Watcher objects From: Henry Robinson To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636833a444b99af04821b29a2 X-Virus-Checked: Checked by ClamAV on apache.org --001636833a444b99af04821b29a2 Content-Type: text/plain; charset=ISO-8859-1 Yes - the watchers aren't simply relay objects, they typically actually process the callback. Scaling out the watchers in a single client is a laudable aim, but I think this proposal would impact some common use cases. Henry On 18 March 2010 15:47, Ted Dunning wrote: > This kind of sounds strange to me. > > My typical idiom is to create a watcher but not retain any references to it > outside the client. It sounds to me like your change will cause my > watchers > to be collected and deactivated when GC happens. > > On Thu, Mar 18, 2010 at 3:32 AM, Dominic Williams < > thedwilliams@googlemail.com> wrote: > > > > > The current ZooKeeper client holds strong references to Watcher objects. > I > > want to change the client so it only holds weak references. Feedback > > please. > -- Henry Robinson Software Engineer Cloudera 415-994-6679 --001636833a444b99af04821b29a2--