public class DatabaseChangeConsumerOps extends Object implements BlockingQueueConsumerOps<DatabaseChangeEvent>
| Constructor and Description |
|---|
DatabaseChangeConsumerOps(BlockingQueue<DatabaseChangeEvent> queue,
FlowControlMode flowControlMode) |
| Modifier and Type | Method and Description |
|---|---|
DatabaseChangeEvent |
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.
|
DatabaseChangeEvent |
take()
Retrieves and removes the head of this queue, waiting if necessary
until an element becomes available.
|
public DatabaseChangeConsumerOps(BlockingQueue<DatabaseChangeEvent> queue, FlowControlMode flowControlMode)
public DatabaseChangeEvent take() throws InterruptedException
BlockingQueueConsumerOpstake in interface BlockingQueueConsumerOps<DatabaseChangeEvent>InterruptedException - if interrupted while waitingpublic DatabaseChangeEvent poll(long timeout, TimeUnit unit) throws InterruptedException
BlockingQueueConsumerOpspoll in interface BlockingQueueConsumerOps<DatabaseChangeEvent>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.