com.atlassian.jira.issue.index
Class SingleThreadedIssueIndexer

java.lang.Object
  extended by com.atlassian.jira.issue.index.SingleThreadedIssueIndexer
All Implemented Interfaces:
IssueIndexer
Direct Known Subclasses:
MultiThreadedIssueIndexer

public class SingleThreadedIssueIndexer
extends Object
implements IssueIndexer


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.issue.index.IssueIndexer
IssueIndexer.Analyzers
 
Constructor Summary
SingleThreadedIssueIndexer()
           
SingleThreadedIssueIndexer(ApplicationProperties applicationProperties)
           
SingleThreadedIssueIndexer(LuceneConnectionFactory connectionFactory, IndexPath indexPath)
           
 
Method Summary
 void deindexIssues(IssuesIterable issues, Context event)
           
protected  void deindexIssues(IssuesIterable issues, Context context, com.atlassian.bonnie.ILuceneConnection issueLuceneConnection, com.atlassian.bonnie.ILuceneConnection commentLuceneConnection)
           
 void deleteAndReinitializeIndexes()
           
protected  com.atlassian.bonnie.ILuceneConnection getCommentLuceneConnection(boolean create)
           
protected  List getComments(Issue issue)
           
 org.apache.lucene.search.IndexSearcher getCommentSearcher()
           
protected  com.atlassian.bonnie.ILuceneConnection getIssueLuceneConnection(boolean create)
           
 org.apache.lucene.search.IndexSearcher getIssueSearcher()
           
 void indexIssues(IssuesIterable issues, Context event)
           
protected  void indexIssues(IssuesIterable issues, Context context, com.atlassian.bonnie.ILuceneConnection issueLuceneConnection, com.atlassian.bonnie.ILuceneConnection commentLuceneConnection)
           
protected  void indexIssuesAndComments(com.atlassian.jira.issue.index.SingleThreadedIssueIndexer.AbstractIssueAndCommentHandler issueAndCommentHandler, IssuesIterable issues, Context event, org.apache.lucene.index.IndexWriter issueWriter, org.apache.lucene.index.IndexWriter commentsWriter)
           
 void indexIssuesBatchMode(IssuesIterable issues, Context context)
          Index the given issues, use whatever is in your arsenal to do it as FAST as possible.
 void optimize()
           
 void reindexIssues(IssuesIterable issues, Context context)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleThreadedIssueIndexer

public SingleThreadedIssueIndexer()

SingleThreadedIssueIndexer

public SingleThreadedIssueIndexer(ApplicationProperties applicationProperties)

SingleThreadedIssueIndexer

public SingleThreadedIssueIndexer(LuceneConnectionFactory connectionFactory,
                                  IndexPath indexPath)
Method Detail

deleteAndReinitializeIndexes

public void deleteAndReinitializeIndexes()
Specified by:
deleteAndReinitializeIndexes in interface IssueIndexer

shutdown

public void shutdown()
Specified by:
shutdown in interface IssueIndexer

optimize

public void optimize()
Specified by:
optimize in interface IssueIndexer

getComments

protected List getComments(Issue issue)

indexIssues

public void indexIssues(IssuesIterable issues,
                        Context event)
Specified by:
indexIssues in interface IssueIndexer

indexIssues

protected void indexIssues(IssuesIterable issues,
                           Context context,
                           com.atlassian.bonnie.ILuceneConnection issueLuceneConnection,
                           com.atlassian.bonnie.ILuceneConnection commentLuceneConnection)

indexIssuesAndComments

protected void indexIssuesAndComments(com.atlassian.jira.issue.index.SingleThreadedIssueIndexer.AbstractIssueAndCommentHandler issueAndCommentHandler,
                                      IssuesIterable issues,
                                      Context event,
                                      org.apache.lucene.index.IndexWriter issueWriter,
                                      org.apache.lucene.index.IndexWriter commentsWriter)
                               throws IOException
Throws:
IOException

deindexIssues

public void deindexIssues(IssuesIterable issues,
                          Context event)
Specified by:
deindexIssues in interface IssueIndexer

deindexIssues

protected void deindexIssues(IssuesIterable issues,
                             Context context,
                             com.atlassian.bonnie.ILuceneConnection issueLuceneConnection,
                             com.atlassian.bonnie.ILuceneConnection commentLuceneConnection)

indexIssuesBatchMode

public void indexIssuesBatchMode(IssuesIterable issues,
                                 Context context)
Description copied from interface: IssueIndexer
Index the given issues, use whatever is in your arsenal to do it as FAST as possible.

Specified by:
indexIssuesBatchMode in interface IssueIndexer
Parameters:
issues - An iterator over the issues to index.
context - The Johnson Event to exclude useres while the index occurs.

reindexIssues

public void reindexIssues(IssuesIterable issues,
                          Context context)
Specified by:
reindexIssues in interface IssueIndexer

getIssueSearcher

public org.apache.lucene.search.IndexSearcher getIssueSearcher()
Specified by:
getIssueSearcher in interface IssueIndexer

getCommentSearcher

public org.apache.lucene.search.IndexSearcher getCommentSearcher()
Specified by:
getCommentSearcher in interface IssueIndexer

getIssueLuceneConnection

protected com.atlassian.bonnie.ILuceneConnection getIssueLuceneConnection(boolean create)

getCommentLuceneConnection

protected com.atlassian.bonnie.ILuceneConnection getCommentLuceneConnection(boolean create)


Copyright © 2002-2008 Atlassian. All Rights Reserved.