From dev-return-3440-apmail-polygene-dev-archive=polygene.apache.org@polygene.apache.org Thu Jun 15 08:40:41 2017 Return-Path: X-Original-To: apmail-polygene-dev-archive@www.apache.org Delivered-To: apmail-polygene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C5CD19FB8 for ; Thu, 15 Jun 2017 08:40:41 +0000 (UTC) Received: (qmail 8661 invoked by uid 500); 15 Jun 2017 08:40:41 -0000 Delivered-To: apmail-polygene-dev-archive@polygene.apache.org Received: (qmail 8629 invoked by uid 500); 15 Jun 2017 08:40:41 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 8617 invoked by uid 99); 15 Jun 2017 08:40:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2017 08:40:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id AB6FCC089A for ; Thu, 15 Jun 2017 08:40:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id L_-hjveZ1_Bu for ; Thu, 15 Jun 2017 08:40:39 +0000 (UTC) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2C8465F2FD for ; Thu, 15 Jun 2017 08:40:39 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id p189so4406801lfe.2 for ; Thu, 15 Jun 2017 01:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=DJ7pb/J5c2TXn4Os1OnKa407Spfkth2b3IASClMbuWE=; b=tckFa1zpRR8wifo0Rehu8Az+Qd1eHPQCCg1YZG/vxn/SyAlWfZaRUGe7xvbY0z5W90 giwEv92iIcmDEZtG70ogAKIxxg61PnBeYJ9rGUFf+W/if6LU9Gmci9DfSmNj/suj54m4 IvTpblB9KZofv+FCB1FG5iWLUzavtUrv3NEt3BwZuPU9ctFKWcbGwwOxXUb2TPz4zYg8 YW/PeX6Pdt80DJ6EuM9u8UHLM9QtsECGm0gULlA8thQvPNpgjvT1PypM5PwFC2D3P8R7 czK/M6mZOvDmqotco/6TrZ/sbTPTrFIams144fPjdKiOnbOwPbBTsW5h8ijV0bf8qy9O XXmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=DJ7pb/J5c2TXn4Os1OnKa407Spfkth2b3IASClMbuWE=; b=jL0J/jTDnNka73HhiA5SyRNE9NKai51irUv2Wv+8gvd33iuaZsmzkU0CPwLAXLEAAG GybNhTcfd3pj4+n5J2/mu491FNTtpIV7OSFbbvZNl8hZsUwsgyHubIO9Np7cWPb6KTtZ 45uL3XoItxtfqfAf9tAWsKJGvWo75ocP95RYSB9NQfr6fwGUKfF6LnuNI6Rfnl17w3yd //d1IFhLUZPdC8dT9QksmD4nLdJTD2BCNLK90HpLI3Adl1DQ4a22lntWLP5iaaQQPCEN 4HRjusy48srBl4wvQQ7S3IqBvcwTqj4jj0Et5QK1hf59KMO4e0J5XK+nidXgy3v3ORak MTKg== X-Gm-Message-State: AKS2vOylRj2rZieKBBDyAUGKM+JpKLQ/1gbEHyweeS2cIV1Rc8ht0sZl Jeu0vEaACKNMi4Xupv2jrYfHeSxUPg== X-Received: by 10.25.40.18 with SMTP id o18mr1383532lfo.33.1497516037464; Thu, 15 Jun 2017 01:40:37 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.46.83.18 with HTTP; Thu, 15 Jun 2017 01:40:16 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Thu, 15 Jun 2017 16:40:16 +0800 X-Google-Sender-Auth: 505ZM_SMrI-TDJVKQPBboPLAoCk Message-ID: Subject: Re: Ordering in NamedAssociation To: dev@polygene.apache.org Content-Type: multipart/alternative; boundary="001a114127ca756b5c0551fb9fce" --001a114127ca756b5c0551fb9fce Content-Type: text/plain; charset="UTF-8" First of all, both Preference ES and Cassandra ES will need a fair bit of overhead to keep the ordering. So, is it worth it? I doubt it. It is rather rare to use ordered maps and ordering should be possible to handle at application level. So, I am clarifying this in Javadoc and remove the test in EntityStoreTestSuite. On Thu, Jun 15, 2017 at 4:04 PM, Niclas Hedhman wrote: > Gang, > > The new EntityStoreTestSuite is testing whether ordering (iterator()) is > preserved in the NamedAssociation, so that keys are returned in the same > order they were added. > > This is achieved with a LinkedHashMap internally and Map ES will > (de)serialize that map in order. > > For Preferences ES and Cassandra ES, this is not so, each entry is stored > "natively". > > Now, the question is; Is ORDERING in NamedAssociation a defined semantic > behavior, or simply a side effect of current implementation? > > Cheers > -- > Niclas Hedhman, Software Developer > http://polygene.apache.org - New Energy for Java > -- Niclas Hedhman, Software Developer http://polygene.apache.org - New Energy for Java --001a114127ca756b5c0551fb9fce--