org.apache.cocoon.components.search.components.impl
Class ParallelIndexerImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.search.components.impl.AbstractIndexer
          extended by org.apache.cocoon.components.search.components.impl.ParallelIndexerImpl
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, Indexer

public class ParallelIndexerImpl
extends AbstractIndexer
implements org.apache.avalon.framework.context.Contextualizable

Parrallel Indexer Class

Author:
Nicolas Maisonneuve

Field Summary
 
Fields inherited from class org.apache.cocoon.components.search.components.impl.AbstractIndexer
add_writer, analyzer, clear_mode, delete_reader, dir, mergeFactor
 
Fields inherited from interface org.apache.cocoon.components.search.components.Indexer
DOCUMENT_UID_FIELD, ROLE
 
Constructor Summary
ParallelIndexerImpl()
           
 
Method Summary
protected  void addDocument(org.apache.lucene.document.Document document)
           
 void contextualize(org.apache.avalon.framework.context.Context context)
           
protected  void release()
          releasing resources
 void setNumThread(int num)
          Set the number of thread writer
protected  void updateDocument(org.apache.lucene.document.Document document)
           
 
Methods inherited from class org.apache.cocoon.components.search.components.impl.AbstractIndexer
addDocument, clearIndex, closeReader, closeWriter, del, deleteDocument, getAnalyzer, getIndex, getMergeFactor, index, openIndexReader, openIndexWriter, optimize, recycle, setAnalyzer, setIndex, setMergeFactor, switchToADD_MODE, switchToDEL_MODE
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelIndexerImpl

public ParallelIndexerImpl()
Method Detail

setNumThread

public void setNumThread(int num)
Set the number of thread writer

Parameters:
num - the number of thread

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException

release

protected void release()
                throws IndexException
Description copied from class: AbstractIndexer
releasing resources

Overrides:
release in class AbstractIndexer
Throws:
IndexException

addDocument

protected final void addDocument(org.apache.lucene.document.Document document)
                          throws IndexException
Specified by:
addDocument in class AbstractIndexer
Throws:
IndexException

updateDocument

protected final void updateDocument(org.apache.lucene.document.Document document)
                             throws IndexException
Specified by:
updateDocument in class AbstractIndexer
Throws:
IndexException


Copyright $ Apache Software Foundation. All Rights Reserved.