polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Ordering in NamedAssociation
Date Thu, 15 Jun 2017 08:40:16 GMT
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 <niclas@hedhman.org> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message