public class DocumentQueue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected java.util.List<QueuedDocumentSet> |
queue |
protected boolean |
resetFlag |
Constructor and Description |
---|
DocumentQueue()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocument(QueuedDocumentSet dd)
Add a document to the queue.
|
boolean |
checkIfEmpty(int n)
Check if "empty".
|
void |
clear()
Clear the queue.
|
QueuedDocumentSet |
getDocument(QueueTracker overlapCalculator)
Pull the best-rated document set off the queue, but wait if there is
nothing there.
|
void |
reset()
Wake up all threads waiting on this queue.
|
public static final java.lang.String _rcsid
protected final java.util.List<QueuedDocumentSet> queue
protected boolean resetFlag
public void reset()
public void clear()
public boolean checkIfEmpty(int n)
n
- is the low-water mark; if the number falls below this, then this method will return true.public void addDocument(QueuedDocumentSet dd)
dd
- is the document description.public QueuedDocumentSet getDocument(QueueTracker overlapCalculator) throws java.lang.InterruptedException
overlapCalculator
- performs analysis of the document sets on the queue so that we can
pick the best one.java.lang.InterruptedException