Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0F15114AD for ; Fri, 1 Aug 2014 17:45:17 +0000 (UTC) Received: (qmail 40961 invoked by uid 500); 1 Aug 2014 17:45:17 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 40919 invoked by uid 500); 1 Aug 2014 17:45:17 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 40908 invoked by uid 99); 1 Aug 2014 17:45:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 17:45:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 084089BDE2A; Fri, 1 Aug 2014 17:45:17 +0000 (UTC) From: dragonsinth To: dev@curator.apache.org Reply-To: dev@curator.apache.org References: In-Reply-To: Subject: [GitHub] curator pull request: CURATOR-120 NodeCache and PathChildrenCache ... Content-Type: text/plain Message-Id: <20140801174517.084089BDE2A@tyr.zones.apache.org> Date: Fri, 1 Aug 2014 17:45:17 +0000 (UTC) Github user dragonsinth commented on the pull request: https://github.com/apache/curator/pull/16#issuecomment-50913715 Up to you guys. I don't need it personally anymore, but if you think it would be useful, I'm happy to do the work to land it. Let's just decide on what exactly we want. As I mentioned, I'm loathe to add more constructor arguments as there are already so many overloads. What would you think about either a builder, or else a fluent constructor api? Builder example: ``` cache = PathChildrenCache.newBuilder(client, path) .ensurePath(false) .cacheData(false) .compress(true) .withExecutor(executor) .build() cache.start(); ``` Fluent constructor: ``` cache = new PathChildrenCache(client, path) .ensurePath(false) .cacheData(false) .compress(true) .withExecutor(executor) .start() ``` In this formulation, essentially the new PathChildrenCache modifies its configuration each time, returning itself, which is legal up until start() is called. Once start() is called it's illegal state exception to try to call any of the config methods. Either way, all of the existing defaults would hold for items not specified. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---