写在前面 A Red-Black tree based NavigableMa implementation. TreeMap,是一种具有排序功能的 Map ,是一种基于红黑树结构的的 NavigableMap 。由于它具有红黑树的结构,所以它的 get 、 put 、 constainsKey ...
JDK源码阅读之ThreadLocal
写在前面 This class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via it ...
JDK源码阅读之PriorityBlockingQueue
写在前面 An unbounded {@linkpain java.util.concurrent.BlockingQueue blocking queue} that uses the same ordering rules as class {@link PriorityQueue} and ...
JDK源码阅读之LinkedTransferQueue
前言 An unbounded {*@link *java.util.concurrent.TransferQueue} based on linked nodes.This queue orders elements FIFO (first-in-first-out) with respect ...
JDK源码阅读之SynchronousQueue
写在前面 根据源码总的描述,SynchronousQueue是一个阻塞队列,所有的入队出队操作都是阻塞的。根据作者的描述,这个工具的定位是在线程间同步对象,以达到在线程间传递一些信息、事件、或者任务的目的(They are well suited for handoff designs, in w ...
JDK源码阅读之StampedLock
写在前面 作者Doug Lea_如此描述这个类:_A capability-based lock with three modes for controlling read/write access.这是一个有三种模式的锁。具体哪三种模式,请看源码中的示例。 源码分析自 JDK 1.8.0_17 ...
JDK源码阅读之ReentrantReadWriteLock
写在前面 作者Doug Lea_如此描述这个类:An implementation of {@link java.util.concurrent.locks.ReadWriteLock} supporting similar semantics to {@link java.util.concu ...
JDK源码阅读之ReentrantLok
写在前面 作者Doug Lea_如此描述这个类:_A reentrant mutual exclusion {@link **java.util.concurrent.locks.Lock} with the same basic behavior and semantics as the imp ...
JDK源码阅读之Semaphore
写在前面 作者_Doug Lea_如此描述这个类:A counting semaphore. Conceptually, a semaphore maintains a set of permits. 分析自JDK 1.8.0_171顾名思义。计数信号量,它维护许可数量。acquire一个许可 ...
JDK源码阅读之CyclicBarrier
写在前面 _作者Doug Lea_如此描述这个类:A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. 分析自JDK 1.8. ...