public static final class LegacyScheduler.PeekableFifoQueue<T> extends FifoQueueImpl<T>
| Modifier and Type | Method and Description |
|---|---|
T |
peek()
This method allows the caller to peek at the next object that would
be returned on a
remove call. |
T |
remove()
Removes the next element from the queue and returns it to the caller.
|
T |
remove(long timeout)
Removes the next element from the queue and returns it to the caller.
|
add, add, isEmpty, sizepublic T peek() throws InterruptedException, FifoQueueException
remove call. If the queue is
currently empty then the caller is blocked until an object is put
into the queue.remove.InterruptedException - Thrown if the thread is interrupted.FifoQueueException - Thrown if an error occurs removing an item from the
queue.public T remove() throws InterruptedException, FifoQueueException
remove in interface FifoQueue<T>remove in class FifoQueueImpl<T>InterruptedException - Thrown if the thread is interrupted.FifoQueueException - Thrown if an error occurs removing an item from the
queue.public T remove(long timeout) throws InterruptedException, FifoQueueException
timeout.remove in interface FifoQueue<T>remove in class FifoQueueImpl<T>timeout - The maximum time to wait.InterruptedException - Thrown if the thread is interrupted.FifoQueueException - Thrown if an error occurs removing an item from the
queue.Copyright © 2015. All Rights Reserved.