[infinispan-issues] [JBoss JIRA] (ISPN-6935) Use Collection instead of Set
Radim Vansa (JIRA)
issues at jboss.org
Mon Aug 8 11:57:00 EDT 2016
[ https://issues.jboss.org/browse/ISPN-6935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276337#comment-13276337 ]
Radim Vansa commented on ISPN-6935:
-----------------------------------
There is a similar problem with Maps: at this point we require them to be serializable/externalizable. We could use {{MarshallUtil.marshallMap}} and marshall them more effectively, but that would cause potential problems as in a). We could change the internally held value to Collection<Map.Entry> but this would render the use awkward in some cases.
> Use Collection instead of Set
> -----------------------------
>
> Key: ISPN-6935
> URL: https://issues.jboss.org/browse/ISPN-6935
> Project: Infinispan
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 9.0.0.Alpha4
> Reporter: Radim Vansa
> Assignee: Radim Vansa
> Fix For: 9.0.0.Beta1
>
>
> Currently the xManyCommand commands hold the keys in a set internally. During marshalling and splitting the set (when the command goes remote), we use {{HashSet}}. However, this has drawbacks:
> a) if the set passed to command uses different means of equality than {{Object.hashCode()}} and {{Object.equals()}} we may lose some keys in the derived set - we don't inject dataContainer's keyEquivalence to the commands
> b) as these sets are usually just iterated through (contains() is rare) it's less effective to use complex data structures as {{HashSet}} - plain {{ArrayList}} is sufficient.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list