LinkedBlockingQueue
LinkedBlockingDeque (Java Platform SE 8 ) (oracle.com)
java.util.concurrent.LinkedBlockingQueue
Similar to ArrayBlockingQueue but used LinkedList to implement, therefore capacity limit is optional.
Have
putFirst()
— put tohead
and wait if necessary for the space to become availableputLast()
— similar but totail
takeFirst()
— take fromhead
and wait if necessary if the size is 0takeLast()
— similarly but fromtail