73

HashMap? ConcurrentHashMap? 相信看完这篇没人能难住你!-架构之路的博客

 5 years ago
source link: http://blog.51cto.com/13883927/2159915
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言Map这样的KeyValue在软件开发中是非常经典的结构,常用于在内存中存放数据。本篇主要想讨论ConcurrentHashMap这样一个并发容器,在正式开始之前我觉得有必要谈谈HashMap,没有它就不会有后面的ConcurrentHashMap。HashMap众所周知HashMap底层是基于数组+链表组成的,不过在jdk1.7和1.8中具体实现稍有不同。Base1.71.7中的数据结构图:

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK