|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.infoset.fulltext.utils.ThreadedIndexerManager
public class ThreadedIndexerManager
INTERNAL: A standalone index manager that uses threads and in-memory queues to manage document processing and indexing processes.
Warning: The effects of this class are asynchronous, so indexing might not happen right away even though the index, delete and flush method have returned.
Warning: The delete() method is not supported. Call the method on the nested indexer instead.
Field Summary | |
---|---|
protected DocumentProcessorIF |
doc_processor
|
protected int |
indexed
|
protected EDU.oswego.cs.dl.util.concurrent.QueuedExecutor |
indexer
|
protected int |
indexing
|
protected int |
max_threads
|
protected java.util.Collection<DocumentIF> |
non_indexable
|
protected java.util.Collection<DocumentIF> |
non_processable
|
protected int |
processed
|
protected int |
processing
|
protected EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
processor
|
protected EDU.oswego.cs.dl.util.concurrent.ThreadFactory |
processor_thread_factory
|
protected IndexerIF |
se_indexer
|
protected int |
timeout
|
protected int |
total
|
Constructor Summary | |
---|---|
ThreadedIndexerManager(IndexerIF se_indexer)
Creates the manager and gives it the indexer used to do the actual indexing. |
|
ThreadedIndexerManager(IndexerIF se_indexer,
EDU.oswego.cs.dl.util.concurrent.PooledExecutor _processor,
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor _indexer)
INTERNAL: |
Method Summary | |
---|---|
void |
close()
INTERNAL: Closes the indexer. |
void |
delete()
INTERNAL: Deletes the index. |
int |
delete(java.lang.String field,
java.lang.String value)
INTERNAL: Removes all documents with the specified field value from the index. |
void |
endStatus()
INTERNAL: Outputs post execution status information to log4j. |
void |
flush()
INTERNAL: Flushes all changes done to the index. |
DocumentProcessorIF |
getDocumentProcessor()
INTERNAL: Gets the document processor used by the indexer manager. |
int |
getMaxThreads()
INTERNAL: Returns the maximum number of threads allowed in the thread pool. |
EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
getProcessorExecutor()
INTERNAL: Gets the document processor executor that is used. |
EDU.oswego.cs.dl.util.concurrent.ThreadFactory |
getProcessorThreadFactory()
INTERNAL: Gets the document processor thread factory. |
int |
getProcessorTimeout()
INTERNAL: Gets the document processor timeout (milliseconds). |
void |
index(DocumentIF document)
INTERNAL: Indexes the specified document. |
void |
setDocumentProcessor(DocumentProcessorIF doc_processor)
INTERNAL: Sets the document processor which is to be used by the indexer manager. |
void |
setMaxThreads(int max_threads)
INTERNAL: Sets the maximum number of threads allowed in the thread pool. |
void |
setProcessorExecutor(EDU.oswego.cs.dl.util.concurrent.PooledExecutor executor)
INTERNAL: Sets the document processor executor that is to be used. |
void |
setProcessorThreadFactory(EDU.oswego.cs.dl.util.concurrent.ThreadFactory thread_factory)
INTERNAL: Sets the document processor thread factory. |
void |
setProcessorTimeout(int timeout)
INTERNAL: Sets the document processor timeout (milliseconds). |
void |
status()
INTERNAL: Outputs execution status information to log4j. |
void |
threadStatus()
INTERNAL: Outputs thread status information to log4j. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IndexerIF se_indexer
protected DocumentProcessorIF doc_processor
protected EDU.oswego.cs.dl.util.concurrent.QueuedExecutor indexer
protected EDU.oswego.cs.dl.util.concurrent.PooledExecutor processor
protected int timeout
protected int max_threads
protected EDU.oswego.cs.dl.util.concurrent.ThreadFactory processor_thread_factory
protected java.util.Collection<DocumentIF> non_processable
protected java.util.Collection<DocumentIF> non_indexable
protected int total
protected int processing
protected int indexing
protected int processed
protected int indexed
Constructor Detail |
---|
public ThreadedIndexerManager(IndexerIF se_indexer)
public ThreadedIndexerManager(IndexerIF se_indexer, EDU.oswego.cs.dl.util.concurrent.PooledExecutor _processor, EDU.oswego.cs.dl.util.concurrent.QueuedExecutor _indexer)
Method Detail |
---|
public DocumentProcessorIF getDocumentProcessor()
public void setDocumentProcessor(DocumentProcessorIF doc_processor)
public EDU.oswego.cs.dl.util.concurrent.ThreadFactory getProcessorThreadFactory()
public void setProcessorThreadFactory(EDU.oswego.cs.dl.util.concurrent.ThreadFactory thread_factory)
public int getProcessorTimeout()
public void setProcessorTimeout(int timeout)
public int getMaxThreads()
public void setMaxThreads(int max_threads)
public void index(DocumentIF document)
IndexerIF
index
in interface IndexerIF
public int delete(java.lang.String field, java.lang.String value)
IndexerIF
delete
in interface IndexerIF
public void flush()
IndexerIF
flush
in interface IndexerIF
public void delete() throws java.io.IOException
IndexerIF
delete
in interface IndexerIF
java.io.IOException
public void close()
IndexerIF
close
in interface IndexerIF
public void status()
public void threadStatus()
public void endStatus()
public EDU.oswego.cs.dl.util.concurrent.PooledExecutor getProcessorExecutor()
public void setProcessorExecutor(EDU.oswego.cs.dl.util.concurrent.PooledExecutor executor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |