Queue queue summary

LinkedList implements two-way queue Deque, LinkedList allows you to add null elements
PriorityQueue have unbounded priority queue
ConcurrentLinkedQueue is the underlying thread-safe list

ArrayBlockingQueue fair strategy underlying array is / are non-blocking queue fairness policy bounded
LinkedBlockingQueue bottom is bounded list (when not declared, the capacity of the 31 th -12) blocking queue
PriorityBlockingQueue prioritized unbounded blocking queue, PUT when not blocked, according to the priority elements when taken take
elements of the queue DelayedQueue delayed must implement the interface, each element has its own delay time. PriorityQueue used to access the data, when PUT is not blocked, the remaining elements will be according to await the time take Delayed

SynchronousQueue synchronization queue, put if no other threads take the appropriate operation will be blocked. vice versa. does not block when offer, while another thread happens to have taken elements, offer returns true.
The queue can not traverse, there is only one element, load / store operations correspond. TransferQueue / TransferStack

Guess you like

Origin www.cnblogs.com/han6/p/11308144.html