简介

队列是一种先进先出的数据结构,在排队、削峰、缓存等多种场景下都会用到。今天学习下JUC中提供的并发队列-Concurrent edQueue

可以看他的继承和实现接口非常简单,继承了AbstractQueue类,实现了Queue接口。

Concurrent edQueue

add

在队列尾部新添加一个元素

/** * Inserts the specified element at the tail of this queue. * As the queue is unbounded, this method will never throw * {@  IllegalStateException} or return {@code false}. * * @return {@code true} (as s
收藏 打印