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 ║ ╚═══════════════╩═══════════════════════════════════════╩═════════════════════╝
  • 相关阅读:
    C++Primer第5版学习笔记(三)
    C++Primer第5版学习笔记(二)
    C++Primer第5版学习笔记(一)
    A*寻路算法的探寻与改良(三)
    A*寻路算法的探寻与改良(二)
    A*寻路算法的探寻与改良(一)
    html5页面js判断是否安装app,以及判断是否在app内部打开html5页面
    结合prototype和xmlhttprequest封装ajax请求
    前端常见的性能优化和浏览器兼容性问题
    常见的HTTP状态码
  • 原文地址:https://www.cnblogs.com/sunxucool/p/5477274.html
Copyright © 2011-2022 走看看