hybridtheorylink / hybridtheorylink.github.io2

0 stars 0 forks source link

HashMap、ConcurrentHashMap 原理分析 | HybridTheory #28

Open hybridtheorylink opened 5 years ago

hybridtheorylink commented 5 years ago

https://hybridtheorylink.github.io/2019/04/22/HashMap%E3%80%81ConcurrentHashMap-%E5%8E%9F%E7%90%86%E5%88%86%E6%9E%90/

前言Map 这样的 Key Value 在软件开发中是非常经典的结构,常用于在内存中存放数据。 本篇主要想讨论 ConcurrentHashMap 这样一个并发容器,在正式开始之前我觉得有必要谈谈 HashMap,没有它就不会有后面的 ConcurrentHashMap。 HashMap众所周知 HashMap 底层是基于 数组 + 链表 组成的,不过在 jdk1.7 和 1.8 中具体实现稍有不