sunxucool
来自: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 ║ ╚═══════════════╩═══════════════════════════════════════╩═════════════════════╝

分类:

技术点:

相关文章:

  • 2021-08-11
  • 2021-12-03
  • 2021-12-05
  • 2021-12-17
  • 2021-09-19
  • 2021-09-13
  • 2021-08-25
  • 2021-11-06
猜你喜欢
  • 2022-01-04
  • 2020-03-19
  • 2021-09-17
  • 2022-02-26
  • 2021-07-22
  • 2021-08-28
  • 2021-12-12
相关资源
相似解决方案