|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.pipeline.AbstractPipelineImpl
com.sun.labs.minion.pipeline.AsyncPipelineImpl
public class AsyncPipelineImpl
A class that encapsulates the machinery of a single indexing pipeline. A pipeline can be used for indexing data or for performing highlighting operations.
| Field Summary | |
|---|---|
protected boolean |
doDump
Whether we need to dump our partition. |
protected boolean |
doFlush
Whether we should flush all of the data currently in the pipeline. |
protected boolean |
doPurge
Whether we need to purge the data in this partition/pipeline. |
protected boolean |
finished
Whether we've finished and must quit. |
protected java.util.concurrent.BlockingQueue<Indexable> |
indexingQueue
The queue from which we will take documents to index. |
protected boolean |
inDoc
Whether we're currently in a document. |
protected boolean |
simpleIndexingFinished
Whether we're finished as a SimpleIndexer. |
| Fields inherited from class com.sun.labs.minion.pipeline.AbstractPipelineImpl |
|---|
currKey, d64, docSize, dumper, engine, head, logTag, pipeline, text |
| Constructor Summary | |
|---|---|
AsyncPipelineImpl(PipelineFactory factory,
SearchEngine engine,
java.util.List<Stage> pipeline,
Dumper dumper,
java.util.concurrent.BlockingQueue<Indexable> indexingQueue)
Instantiates a pipeline. |
|
| Method Summary | |
|---|---|
protected void |
drain()
Drains the indexing queue, indexing each of the elements. |
void |
dump()
Dumps the current indexing data to disk. |
void |
flush()
Flushes all the data currently held in the queue. |
void |
index(Indexable doc)
Adds an indexable object to the pipeline for indexing. |
void |
purge()
Purge the data currently in the pipeline. |
void |
run()
Removes documents from the queue and indexes them. |
void |
shutdown()
Shuts down this pipeline, making sure that any documents in the queue have been finished. |
| Methods inherited from class com.sun.labs.minion.pipeline.AbstractPipelineImpl |
|---|
addImpliedField, endDocument, getEngine, getHead, getIndexer, handleField, handleField, indexDoc, isIndexed, realDump, realPurge, setIndexer, startDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.concurrent.BlockingQueue<Indexable> indexingQueue
protected boolean inDoc
protected boolean simpleIndexingFinished
SimpleIndexer.
protected boolean finished
protected boolean doFlush
protected boolean doDump
protected boolean doPurge
| Constructor Detail |
|---|
public AsyncPipelineImpl(PipelineFactory factory,
SearchEngine engine,
java.util.List<Stage> pipeline,
Dumper dumper,
java.util.concurrent.BlockingQueue<Indexable> indexingQueue)
factory - the factory from which to make this pipelineengine - The search engine for which this pipeline will be
processing documents.pipeline - the stages in the pipelinedumper - the dumper that will dump partitions after indexingindexingQueue - the queue of items to index| Method Detail |
|---|
public void run()
run in interface java.lang.Runnableprotected void drain()
public void flush()
flush in interface Pipelinepublic void dump()
dump in interface Pipelinepublic void purge()
purge in interface PipelineSearchEngineExceptionpublic void shutdown()
shutdown in interface Pipelinepublic void index(Indexable doc)
Pipeline
index in interface Pipelinedoc - a document to index.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||