摘要:
1、结构 使用的是PriorityQueue来作为底层的存储 元素需要实现Delayed接口,该接口继承了comparable接口 DelayQueue的队头元素是根据comparable排在队首的元素 无论是入队还是出队都是先加锁,也就是异步进行的。 2、add,put,offer操作底层都是调的 阅读全文
posted @ 2016-07-05 16:14
YDDMAX
阅读(225)
评论(0)
推荐(0)
摘要:
优先级队列 1、无限的 2、不允许null 3、在构造queue或者元素需要实现comparable接口 4、数据结构是堆,而且是极小堆。存储是数组。 An unbounded priority queue based on a priority heap. The elements of the 阅读全文
posted @ 2016-07-05 16:05
YDDMAX
阅读(120)
评论(0)
推荐(0)

浙公网安备 33010602011771号