随笔分类 -  java

摘要:一 类图 二 构造方法 public SynchronousQueue() { this(false); } /** * Creates a {@code SynchronousQueue} with the specified fairness policy. * * @param fair if 阅读全文
posted @ 2022-11-24 23:19 Bannirui 阅读(26) 评论(0) 推荐(0) 编辑
摘要:一 类图 二 构造方法 // LinkedBlockingQueue.java // take锁 private final ReentrantLock takeLock = new ReentrantLock(); // put锁 private final ReentrantLock putLo 阅读全文
posted @ 2022-11-22 20:53 Bannirui 阅读(20) 评论(0) 推荐(0) 编辑
摘要:一 阻塞队列API | | Throws exception | Special value | Blocks | Times out | | | | | | | | Insert | add(e) | offer(e) | put(e) | offer(e, time, unit) | | Rem 阅读全文
posted @ 2022-11-22 16:48 Bannirui 阅读(18) 评论(0) 推荐(0) 编辑
摘要:一 Executors工具类创建ThreadPoolExecutor | | SingleThreadExecutor | newFixedThreadPool | newCachedThreadPool | newScheduledThreadPool | newSingleThreadSched 阅读全文
posted @ 2022-11-21 23:14 Bannirui 阅读(80) 评论(0) 推荐(0) 编辑
摘要:java对象头之MarkWord 直接引用openjdk的cpp源码注释 // The markOop describes the header of an object. // // Note that the mark is not a real oop but just a word. // 阅读全文
posted @ 2022-05-29 02:06 Bannirui 阅读(93) 评论(0) 推荐(0) 编辑
摘要:解决了什么问题 A thread-safe variant of ArrayList in which all mutative operations (add, set, and so on) 引用CopyOnWriteArrayList的doc就是解决了ArrayList并发场景下对容器的修改安 阅读全文
posted @ 2022-05-18 12:14 Bannirui 阅读(56) 评论(0) 推荐(0) 编辑
摘要:摘要 AQS是什么 使用方式 源码原理 AQS是什么 摘自java doc,简而言之就是该类基于阻塞队列为同步锁的实现提供了框架功能 Provides a framework for implementing blocking locks and related synchronizers (sem 阅读全文
posted @ 2022-02-18 14:06 Bannirui 阅读(108) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示