摘要:
KISS【keep it simple, stupid】 YAGNI【You’re NOT gonna need it!】 Do The Simplest Thing That Could Possibly Work Separation of Concerns【分离关注点】 DRY【don't r 阅读全文
摘要:
```java @Slf4j public class PoisonPill { /** * 毒丸模式:生产者通过某种方式告知消费者,消息已经发送完毕,消费端将停止接收任何消息。 */ @Test public void all() throws InterruptedException { final ArrayBlockingQueue queue = new ArrayB... 阅读全文
摘要:
```java @Slf4j public class DoubleCheckedLock { / 双重校验锁模式可以避免多线程竞争时,无谓的资源消耗 / @Test public void all() throws InterruptedException { final LimitedList 阅读全文