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 to head and wait if necessary for the space to become available
  • putLast() — similar but to tail
  • takeFirst() — take from head and wait if necessary if the size is 0
  • takeLast() — similarly but from tail