|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.crawler.system.DocumentCleanupQueue
public class DocumentCleanupQueue
This class describes a cleanup document queue, which has a "stuffer" thread and many "reader" threads. The queue manages thread synchronization so that (a) the "stuffer" thread blocks until queue is empty, and (b) the "reader" threads block if queue is empty. The objects being queued are all QueuedDocumentSet objects.
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected java.util.ArrayList |
queue
|
| Constructor Summary | |
|---|---|
DocumentCleanupQueue()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDocuments(DocumentCleanupSet dd)
Add a document set to the queue. |
boolean |
checkIfEmpty(int n)
Check if "empty". |
void |
clear()
Clear. |
DocumentCleanupSet |
getDocuments()
Pull a document set off the queue, and wait if there is nothing there. |
void |
reset()
Wake up all threads waiting on this queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
protected java.util.ArrayList queue
| Constructor Detail |
|---|
public DocumentCleanupQueue()
| Method Detail |
|---|
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 addDocuments(DocumentCleanupSet dd)
dd - is the document set.
public DocumentCleanupSet getDocuments()
throws java.lang.InterruptedException
java.lang.InterruptedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||