You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Cédric BODIN (JIRA)" <ji...@apache.org> on 2007/10/10 15:33:50 UTC

[jira] Created: (CHAIN-40) ContextBase should use LinkedHashMap

ContextBase should use LinkedHashMap
------------------------------------

                 Key: CHAIN-40
                 URL: https://issues.apache.org/jira/browse/CHAIN-40
             Project: Commons Chain
          Issue Type: Improvement
            Reporter: Cédric BODIN
            Priority: Minor


org.apache.commons.chain.impl.ContextBase should use java.util.LinkedHashMap (instead of java.util.HashMap) : as its superclass,  and as the java.util.Map implementation for its "descriptors" attribute.
Indeed LinkedHashMap allow "insertion-order" iteration over the context, which is an additional information about the chain execution (to know the order of the commands into the chain).
Moreover LinkedHashMap is a HashMap : so this enhancement is "transparent" for users who didn't/don't/won't want to presume about context's iteration order.

Thanks in advance.
Cédric BODIN

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CHAIN-40) ContextBase should use LinkedHashMap

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CHAIN-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598487#action_12598487 ] 

Niall Pemberton commented on CHAIN-40:
--------------------------------------

Requires moving Commons Chain to a mimimum of JDK 1.4

> ContextBase should use LinkedHashMap
> ------------------------------------
>
>                 Key: CHAIN-40
>                 URL: https://issues.apache.org/jira/browse/CHAIN-40
>             Project: Commons Chain
>          Issue Type: Improvement
>            Reporter: Cédric BODIN
>            Priority: Minor
>
> org.apache.commons.chain.impl.ContextBase should use java.util.LinkedHashMap (instead of java.util.HashMap) : as its superclass,  and as the java.util.Map implementation for its "descriptors" attribute.
> Indeed LinkedHashMap allow "insertion-order" iteration over the context, which is an additional information about the chain execution (to know the order of the commands into the chain).
> Moreover LinkedHashMap is a HashMap : so this enhancement is "transparent" for users who didn't/don't/won't want to presume about context's iteration order.
> Thanks in advance.
> Cédric BODIN

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CHAIN-40) ContextBase should use LinkedHashMap

Posted by "ori (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CHAIN-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658183#action_12658183 ] 

ori commented on CHAIN-40:
--------------------------

There's additional overhead to using LinkedHashMap, HashMap is more efficient, especially if you're creating the Map on every request.

> ContextBase should use LinkedHashMap
> ------------------------------------
>
>                 Key: CHAIN-40
>                 URL: https://issues.apache.org/jira/browse/CHAIN-40
>             Project: Commons Chain
>          Issue Type: Improvement
>            Reporter: Cédric BODIN
>            Priority: Minor
>
> org.apache.commons.chain.impl.ContextBase should use java.util.LinkedHashMap (instead of java.util.HashMap) : as its superclass,  and as the java.util.Map implementation for its "descriptors" attribute.
> Indeed LinkedHashMap allow "insertion-order" iteration over the context, which is an additional information about the chain execution (to know the order of the commands into the chain).
> Moreover LinkedHashMap is a HashMap : so this enhancement is "transparent" for users who didn't/don't/won't want to presume about context's iteration order.
> Thanks in advance.
> Cédric BODIN

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.