|Basic queue interface. Defines the basic methods to add elements to the
queue (offer, add),
look at the head of the queue (peek, element) or pop the head of the queue off the queue
(poll, remove). There
are two versions of each method, e.g. offer returns
a magic value on trouble and add throws an
Exception. Queue is
derived from Collection so all the Collection methods are also available.
|If the queue is empty, blocks the current thread until some other thread
adds an element. You can provide a timeout how long you are prepared to
|Underpinnings for ArrayBlockingQueue,
ConcurrentLinkedQueue, DelayQueue, LinkedBlockingQueue,
PriorityBlockingQueue, PriorityQueue, SynchronousQueue.
|FIFO blocking queue where the elements are stored in
a fixed size array. The array buffer is circular, somtimes called a squirrel
cage buffer or hamster buffer. When the array fills up it wraps around to the
beginning being careful not to overwrite existing elements. If all goes well,
the oldest elements are popped off in time to create room for new elements, hot
on their heels.
|Unbounded (can grow arbitrarily large), FIFO,
|Unbounded, sorted by delay, so that elements can be eligible to leave the
queue once the delay has expired. The oldest expired delay element pops from
the queue first.
|creates thread pools that work off a todo queue.
|Optionally bounded, FIFO
blocking queue implemented with linked nodes.
|Supports List interface, though it is very slow at indexing since it is
implemented as linked nodes.
|Blocking, sorted queue ordered by natural order Comparable interface or supplied Comparator. Does not permit null elements. Pops the smallest
|Non-blocking, sorted queue ordered by natural order Comparable interface or supplied Comparator. Does not permit null elements. Pops the smallest
|A dummy queue that can’t even hold one element. Every add to the
queue must be matched by an immediate pop before there can be another add. It
is for thread to thread handoff.
|executes each submitted task using one of possibly several pooled