Retrieve and remove the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
Retrieve and remove the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
how long to wait before giving up, in units of unit
the head of this queue, or null if the specified waiting time elapses before an element is available
Retrieve and remove the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
Retrieve and remove the head of this queue, waiting up to the specified wait time if necessary for an element to become available. Also retrieve the remaining quantity of elements. This value can be used to predict whether a following poll would block (if there is a single consumer).
how long to wait before giving up, in units of unit
a pair, consisting of the head of this queue, or null if the specified waiting time elapses before an element is available, and the remaining quantity of elements after the returned element (if any) was removed.
This trait captures the "head side" of the
BlockingQueue
interface