zoukankan      html  css  js  c++  java
  • What's the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?

    来自:http://stackoverflow.com/questions/510632/whats-the-difference-between-concurrenthashmap-and-collections-synchronizedmap
       http://javarevisited.blogspot.hk/2011/04/difference-between-concurrenthashmap.html

    ╔═══════════════╦═══════════════════╦═══════════════════╦═════════════════════╗ ║ Property ║ HashMap ║ Hashtable ║ ConcurrentHashMap ║ ╠═══════════════╬═══════════════════╬═══════════════════╩═════════════════════╣ ║ Null ║ allowed ║ not allowed ║ ║ values/keys ║ ║ ║ ╠═══════════════╬═══════════════════╬═════════════════════════════════════════╣ ║Is thread-safe ║ no ║ yes ║ ╠═══════════════╬═══════════════════╬═══════════════════╦═════════════════════╣ ║ Lock ║ not ║ locks the whole ║ locks the portion ║ ║ mechanism ║ applicable ║ map ║ ║ ╠═══════════════╬═══════════════════╩═══════════════════╬═════════════════════╣ ║ Iterator ║ fail-fast ║ fail-safe ║ ╚═══════════════╩═══════════════════════════════════════╩═════════════════════╝
  • 相关阅读:
    Struts2拦截器
    Struts2执行过程
    struts.xml属性extends的执行顺序和剖析源码
    Struts2请求流程图
    8.29 脏检查笔记
    transactionManager 以及datasource type解析
    Mybatis
    Interceptor
    ongl(示例3-6 多值类型的数据处理)
    ongl(原始类型和包装类型)
  • 原文地址:https://www.cnblogs.com/sunxucool/p/5477274.html
Copyright © 2011-2022 走看看