摘要: 一、简介 ConcurrentSkipListSet底层是通过ConcurrentNavigableMap来实现的,它是一个有序的线程安全的集合。 二、源码分析 它的源码比较简单,跟通过Map实现的Set基本是一致,只是多了一些取最近的元素的方法。 // 实现了NavigableSet接口,并没有所 阅读全文
posted @ 2022-05-17 14:29 夏尔_717 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 一、概述 fail-fast机制是java集合中的一种错误机制。首先我们看下维基百科中关于fail-fast的解释: In systems design, a fail-fast system is one which immediately reports at its interface any 阅读全文
posted @ 2022-05-17 14:29 夏尔_717 阅读(132) 评论(0) 推荐(0) 编辑