Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 781BF200CB4 for ; Tue, 27 Jun 2017 15:55:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 76A5B160BE9; Tue, 27 Jun 2017 13:55:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC958160BDC for ; Tue, 27 Jun 2017 15:55:46 +0200 (CEST) Received: (qmail 62585 invoked by uid 500); 27 Jun 2017 13:55:46 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 62571 invoked by uid 99); 27 Jun 2017 13:55:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jun 2017 13:55:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 17BFE1889EF for ; Tue, 27 Jun 2017 13:55:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.82 X-Spam-Level: X-Spam-Status: No, score=-0.82 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=objectstyle.org header.b=UdUgLx49; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Cir75Y5F Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 2IzaehZPXqsZ for ; Tue, 27 Jun 2017 13:55:43 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EA2F45F2A9 for ; Tue, 27 Jun 2017 13:55:42 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D925B211C5 for ; Tue, 27 Jun 2017 09:55:40 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Tue, 27 Jun 2017 09:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=objectstyle.org; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=WgWPrWWCv57MdWl RmfUCAlauYj0Tymt0799fA+tw6fk=; b=UdUgLx49inEClStMHWYfkWRFze+ErEC wyT+NpcT0AI/iYV92sZHabm6yhw98Pw/D3FlCkg6ZS2ChQKJG8AwpsjPNdrjYBT0 tl3ITV5BoLS6g0h4/Z4doKrGlLb1HEamy3aTHgeKQDGvP433hiXjvlMzZiyq/Iax V4TmODv0OSPg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=WgWPrWWCv57MdWlRmfUCAlauYj0Tymt0799fA+tw6fk=; b=Cir75Y5F N72KjpVnpYPo+q98Qe2n+q1vBss+mxS1p/X+kfv3KlhdJzIzQwAecqIfhLd2iqwK TrmlLg0CCNflF9ZdLwqJz3NIeGdjAJj9vZc3FLmVmj7IY6d7Xw4wp6pQKTE//E3N M5NId6xUg+tZdDp6vuClWS/Ti1MpIvgkj9Q/iI05nQ1vyf+OEeFMmxGHxS9JrFtC otVZP9OlnZv8yBYUpUkctNTISAL1qOSXch5caABM339mDC+AX5N2EhntW160MBPm uhFWYmVB2w112Wb7QWfxYYKNsbv3CLfRpciETJUvFvC6qYUKYW0TwwYfq2RUbX5d IQvW/7jTmxuyoA== X-ME-Sender: X-Sasl-enc: MThyEx7DXhvVrn9GY9h1ek2J+KgV/8BPQfISgO5p6Rjd 1498571740 Received: from [172.22.11.80] (unknown [8.11.3.67]) by mail.messagingengine.com (Postfix) with ESMTPA id A126524038 for ; Tue, 27 Jun 2017 09:55:40 -0400 (EDT) From: Andrus Adamchik Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: DataRowStore properties Date: Tue, 27 Jun 2017 09:55:40 -0400 References: To: dev@cayenne.apache.org In-Reply-To: Message-Id: <62B44451-3149-47E3-AA94-BC28A7BC0C56@objectstyle.org> X-Mailer: Apple Mail (2.3273) archived-at: Tue, 27 Jun 2017 13:55:47 -0000 I agree, this is confusing. This API is only half-way converted to the = DI style of configuration. So yeah, it doesn't make sense (except as = transitional API that needs to be cleaned up). Ideally all stack objects = should be immutable and initialized with specific values, not = properties. Properties should be decoded by factories that create those = objects. (i.e. we need to stick to separation of configuration code from = the object we are configuring). We are following this approach everywhere in Bootique, and we'll = gradually refactor towards it in Cayenne.=20 > Should SNAPSHOT_EXPIRATION_DEFAULT also be deprecated in this class? Yes. I think in 4.1 we should. Andrus > On Jun 26, 2017, at 9:18 PM, Aristedes Maniatis = wrote: >=20 > I'm a little confused about the way properties are used and set in the = DataRowStore. >=20 > public DataRowStore(String name, RuntimeProperties properties, = EventManager eventManager) >=20 > properties can be null here, but=20 >=20 > protected void initWithProperties(RuntimeProperties properties) >=20 > will throw NPE >=20 >=20 > Also, initWithProperties(properties) seems to just ignore all the = properties we pass except for SNAPSHOT_CACHE_SIZE_PROPERTY. Should = SNAPSHOT_EXPIRATION_DEFAULT also be deprecated in this class? >=20 >=20 > Finally, in the DataDomain class we also have properties, but instead = of being RuntimeProperties they are just Map. Since it = appears that RuntimeProperties are really just an enhanced map with = getters that support default values, should RuntimeProperties be used = consistently? To me this whole class seems like overkill, but maybe it = is useful. >=20 >=20 > Ari >=20 >=20 >=20 > --=20 > --------------------------> > Aristedes Maniatis > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A