public interface PausableBlockingQueue4<T> extends BlockingQueue4<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPaused() |
boolean |
pause()
Pauses the queue, making calls to
Queue4.next() block
until resume() is called. |
boolean |
resume()
Resumes the queue, releasing blocked calls to
Queue4.next() that can reach a next queue item.. |
T |
tryNext()
Returns the next element in queue if there is one available, returns null
otherwise.
|
drainTo, next, stopboolean pause()
Pauses the queue, making calls to Queue4.next() block
until resume() is called.
boolean resume()
Resumes the queue, releasing blocked calls to
Queue4.next() that can reach a next queue item..
boolean isPaused()
T tryNext()
Returns the next element in queue if there is one available, returns null otherwise.
This method will not never block, regardless of the queue being paused or no elements are available.