public class QueueCursor<E> extends QueueIteration<E,QueryEvaluationException>
QueueIteration.done()
and QueueIteration.toss(Exception)
and
automatically converting the exception into a QueryEvaluationException with an appropriate stack trace.Constructor and Description |
---|
QueueCursor(BlockingQueue<E> queue)
Creates an QueueCursor with the given
BlockingQueue as its backing queue.It may not be threadsafe to modify or access the given BlockingQueue from other locations. |
QueueCursor(int capacity)
Creates an QueueCursor with the given (fixed) capacity and default access policy.
|
QueueCursor(int capacity,
boolean fair)
Creates an QueueCursor with the given (fixed) capacity and the specified access policy.
|
Modifier and Type | Method and Description |
---|---|
protected QueryEvaluationException |
convert(Exception e)
Converts an exception from the underlying iteration to an exception of type X.
|
checkException, done, getNextElement, handleClose, put, toss
hasNext, next, remove
close, isClosed
public QueueCursor(int capacity)
capacity
- the capacity of this queuepublic QueueCursor(int capacity, boolean fair)
capacity
- the capacity of this queuefair
- if true then queue accesses for threads blocked on insertion or removal, are processed
in FIFO order; if false the access order is unspecified.public QueueCursor(BlockingQueue<E> queue)
BlockingQueue
as its backing queue.BlockingQueue
from other locations. This method
only enables the default ArrayBlockingQueue
to be overridden.queue
- A BlockingQueue that is not used in other locations, but will be used as the backing Queue
implementation for this cursor.protected QueryEvaluationException convert(Exception e)
QueueIteration
convert
in class QueueIteration<E,QueryEvaluationException>
Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.