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 ║ ╚═══════════════╩═══════════════════════════════════════╩═════════════════════╝
  • 相关阅读:
    [摘]提高SQL语句查询效率的若干建议
    WinForm做的一个多条件查询,主要是解决多控件联动
    MSCRM中用IFRAME显示实体的关联视图
    windows 常用命令
    mscrm WebService开发 之 CrmDiscoveryService
    Mscrm 二次开发之 plugin开发
    热血高校2
    6、情人节杀人事件
    热血高校
    第八章 培养幽默的习惯
  • 原文地址:https://www.cnblogs.com/sunxucool/p/5477274.html
Copyright © 2011-2022 走看看