com.sun.labs.minion
Interface Pipeline

All Known Subinterfaces:
HLPipeline
All Known Implementing Classes:
AbstractPipelineImpl, AsyncPipelineImpl, HLPipelineImpl, SyncPipelineImpl

public interface Pipeline

A class that encapsulates the machinery of a single indexing pipeline. A pipeline can be used for indexing data or for performing highlighting operations.


Method Summary
 void dump()
          Dumps all of the data indexed by a given pipeline into the given dumper.
 void flush()
          Flushes all the data currently held in the queue.
 Stage getHead()
          Gets the head of the pipeline.
 void index(Indexable doc)
          Adds an indexable object to the pipeline for indexing.
 void purge()
          Purge the data currently in the pipeline.
 void shutdown()
          Shuts down the pipeline, flushing all data currently held in the queue.
 

Method Detail

getHead

Stage getHead()
Gets the head of the pipeline.

Returns:
the stage at the head of the pipeline.

index

void index(Indexable doc)
           throws SearchEngineException
Adds an indexable object to the pipeline for indexing.

Parameters:
doc - a document to index.
Throws:
SearchEngineException - if there are any errors during indexing.

dump

void dump()
          throws SearchEngineException
Dumps all of the data indexed by a given pipeline into the given dumper. Data currently in the pipeline will most likely not be indexed before the dump is completed.

Throws:
SearchEngineException - if the dump fails

purge

void purge()
Purge the data currently in the pipeline. The data is thrown out, not getting written out to disk. It is best not to be indexing while a purge is in progress.

Throws:
SearchEngineException

flush

void flush()
Flushes all the data currently held in the queue. If the pipeline is asynchronous, then the flush to disk will occur asynchronously when all of the data in the pipline has been indexed.


shutdown

void shutdown()
Shuts down the pipeline, flushing all data currently held in the queue.