T - queue element typepublic interface BlockingQueueConsumerOps<T>
| Modifier and Type | Method and Description |
|---|---|
T |
poll(long timeout,
TimeUnit unit)
Retrieves and removes the head of this queue, waiting up to the
specified wait time if necessary for an element to become available.
|
T |
take()
Retrieves and removes the head of this queue, waiting if necessary
until an element becomes available.
|
T take() throws InterruptedException
InterruptedException - if interrupted while waitingT poll(long timeout, TimeUnit unit) throws InterruptedException
timeout - how long to wait before giving up, in units of unitunit - a TimeUnit determining how to interpret the timeout parameternull if the specified waiting time elapses
before an element is availableInterruptedException - if interrupted while waitingCopyright © 2021 Couchbase, Inc.. All rights reserved.