java.util.concurrent
Class
ConcurrentHashMap JDK 1.5 / JDK 8 CAS+桶锁重构
高并发线程安全哈希表。JDK 8+ 摒弃 Segment 分段锁,采用 CAS 无锁插入 + 单桶头节点 synchronized 细粒度锁定,读操作完全无锁。
3 项核心属性
·
5 个常用方法
putIfAbsent()
compute()
computeIfAbsent()