You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Chen (Jira)" <ji...@apache.org> on 2019/11/04 03:10:00 UTC

[jira] [Commented] (COLLECTIONS-520) Add a CopyOnWrite implementation of Map

    [ https://issues.apache.org/jira/browse/COLLECTIONS-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16966381#comment-16966381 ] 

Chen commented on COLLECTIONS-520:
----------------------------------

So does this feature need to be implemented?

> Add a CopyOnWrite implementation of Map
> ---------------------------------------
>
>                 Key: COLLECTIONS-520
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-520
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Map
>    Affects Versions: 4.0
>            Reporter: Daniel Feist
>            Priority: Major
>             Fix For: 4.x
>
>
> Java provides implementations for List's and Set's but Map is missing.
> Jersey uses an implementation ([com.sun.jersey.client.impl.CopyOnWriteHashMap|https://java.net/projects/jersey/sources/svn/content/trunk/jersey/jersey-client/src/main/java/com/sun/jersey/client/impl/CopyOnWriteHashMap.java]) but it doesn't fully implement Map because entrySet/keySet/values are not mutable.
> I implemented a CaseInsensitiveCopyOnWriteMap in Mule and while it serves our purposes it's not 100% complete and isn't thread-safe, and it would be good to see an implementation in commons.  (BTW: I plan to extend from AsbtractHashedMap once we moved to 4.0/4.1).  
> See:  [org.mule.util.CopyOnWriteCaseInsensitiveMap|https://github.com/mulesoft/mule/blob/716893e6231be47dccd3cfba9619762e146b4b84/core/src/main/java/org/mule/util/CopyOnWriteCaseInsensitiveMap.java]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)