|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.bonnie.index.BaseMultiThreadedIndexer
com.atlassian.bonnie.index.OnlineMultiThreadedIndexer
public class OnlineMultiThreadedIndexer
Performs batch indexing in multiple threads.
This class is designed for:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.bonnie.index.BatchOpIndexer |
|---|
BatchOpIndexer.DocumentWritingScheme |
| Field Summary | |
|---|---|
protected edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue |
reindexAddedQueue
|
protected edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue |
reindexDeletedQueue
|
| Fields inherited from class com.atlassian.bonnie.index.BaseMultiThreadedIndexer |
|---|
log, luceneConnection |
| Constructor Summary | |
|---|---|
OnlineMultiThreadedIndexer()
|
|
| Method Summary | |
|---|---|
protected void |
allThreadsComplete(BatchOpIndexer.DocumentWritingScheme scheme,
boolean truncate,
com.atlassian.core.util.ProgressWrapper progress)
Perform clean-up operations such as closing writers, optimizing, merging with original index, etc. |
protected void |
doAdd(java.lang.Object o,
org.apache.lucene.index.IndexWriter writer)
Performs the actual adding of the object to the index. |
protected void |
doDelete(java.lang.Object o,
org.apache.lucene.index.IndexReader reader)
Perform the actual deleting. |
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Get analyzer used for indexing. |
protected BatchOpIndexer.DocumentWritingScheme |
getDocumentWritingScheme(boolean reindex)
Creates a new instance of a DocumentWritingScheme. |
protected ObjectToDocumentConverter |
getObjectToDocumentConverter()
|
void |
index(java.lang.Object o)
Add an object to the index. |
protected void |
optimize(LuceneConnection conn)
Optimize the index. |
void |
setLuceneConnection(LuceneConnection luceneConnection)
|
void |
setObjectToDocumentConverter(ObjectToDocumentConverter objectToDocumentConverter)
|
protected void |
setReindexingStatus(boolean status)
|
void |
unindex(java.lang.Object o)
Remove an object from the index. |
| Methods inherited from class com.atlassian.bonnie.index.BaseMultiThreadedIndexer |
|---|
calculateNumberOfThreads, getQueueProcessingRunnable, isReindexing, reindex, setReindexing, truncateIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue reindexAddedQueue
protected edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue reindexDeletedQueue
| Constructor Detail |
|---|
public OnlineMultiThreadedIndexer()
| Method Detail |
|---|
protected void allThreadsComplete(BatchOpIndexer.DocumentWritingScheme scheme,
boolean truncate,
com.atlassian.core.util.ProgressWrapper progress)
BaseMultiThreadedIndexer
allThreadsComplete in class BaseMultiThreadedIndexerscheme - schemetruncate - should the original index be truncatedpublic void index(java.lang.Object o)
SingleObjectIndexerSingleObjectIndexer.unindex(java.lang.Object) before the object is added.
index in interface SingleObjectIndexer
protected void doAdd(java.lang.Object o,
org.apache.lucene.index.IndexWriter writer)
throws java.io.IOException
o - writer -
java.io.IOExceptionpublic void unindex(java.lang.Object o)
SingleObjectIndexer
unindex in interface SingleObjectIndexer
protected void doDelete(java.lang.Object o,
org.apache.lucene.index.IndexReader reader)
throws java.io.IOException
o - object to deletereader - reader
java.io.IOExceptionprotected final void optimize(LuceneConnection conn)
conn - protected BatchOpIndexer.DocumentWritingScheme getDocumentWritingScheme(boolean reindex)
reindex - is this a reindexpublic void setLuceneConnection(LuceneConnection luceneConnection)
setLuceneConnection in interface SingleObjectIndexerprotected ObjectToDocumentConverter getObjectToDocumentConverter()
public void setObjectToDocumentConverter(ObjectToDocumentConverter objectToDocumentConverter)
setObjectToDocumentConverter in interface SingleObjectIndexerpublic org.apache.lucene.analysis.Analyzer getAnalyzer()
BatchOpIndexer
getAnalyzer in interface BatchOpIndexer
protected void setReindexingStatus(boolean status)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||