What's the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
2016-05-10 11:48
393 查看
来自: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 ║ ╚═══════════════╩═══════════════════════════════════════╩═════════════════════╝
相关文章推荐
- jquery获取input单选按钮点击事件及单选按钮值的方法
- js实现的简单图片浮动效果完整实例
- 深入理解js匿名函数与闭包
- 无刷新分页 jquery.pagination.js
- ExtJS快速入门指南
- Bootstrap 栅格系统 理解与总结
- webstorm查看angular2的ts源码
- Nodejs 与MySQL交互(felixge/node-mysql)
- 页面引入jQuery mobile 底部出现loading字样
- jquery实现点击弹出可放大居中及关闭的对话框(附demo源码下载)
- 入门React-Native世界
- BootStrap-Table 分页
- jquery 加载等待效果
- 百度2016实习 前端试题中的编程题2:Excel地址的相互转换 [2015南桥杯试题]
- js 获取事件源
- HTML&CSS——css中postion的fixed与absolute区别详解
- js/jsp操作cookie的方法
- 2016最新前端开发学习资料集锦
- 详情页JS特效:往下滚动时,侧边新闻随着固定显示
- Xcode升级7.3 编译时出错Cannot create __weak reference in file using manual