com.atlassian.jira.issue.index
Class BulkOnlyIndexManager

java.lang.Object
  extended by com.atlassian.jira.issue.index.DefaultIndexManager
      extended by com.atlassian.jira.issue.index.BulkOnlyIndexManager
All Implemented Interfaces:
IssueIndexManager

public class BulkOnlyIndexManager
extends DefaultIndexManager

This index manager ignores calls to reIndex(org.ofbiz.core.entity.GenericValue), deIndex(org.ofbiz.core.entity.GenericValue) and reIndexIssues(Collection).

It should only be used where the indexer will manually call reIndexAll()!


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
ANALYZER_FOR_INDEXING, ANALYZER_FOR_SEARCHING, COMMENTS_SUBDIR, ISSUES_SUBDIR, PLUGINS_SUBDIR
 
Constructor Summary
BulkOnlyIndexManager()
          public default ctor for pico
BulkOnlyIndexManager(ApplicationProperties applicationProperties, IssueIndexer issueIndexer)
          private only for testing purposes (use the factory method to get an instance)
 
Method Summary
 void deIndex(org.ofbiz.core.entity.GenericValue entity)
          Remove an issue from the search index.
 long optimize()
          Optimize the underlying indexes.
 void reIndex(org.ofbiz.core.entity.GenericValue entity)
          Reindex an issue (eg.
 void reIndex(Issue entity)
          Reindex an issue (eg.
 long reIndexAll()
          Reindex all issues.
 long reIndexAll(com.atlassian.johnson.event.Event event)
          Reindex all issues.
 long reIndexIssueObjects(Collection issueObjects)
          Reindex a set of issues.
 long reIndexIssues(Collection issues)
          Reindex a set of issues (GenericValues).
 long reIndexIssues(IssuesIterable issuesIterable, com.atlassian.johnson.event.Event event)
          Reindex a list of issues, passing an optional event that will be set progress
 
Methods inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
activate, deactivate, deactivate, getAllIndexPaths, getCommentSearcher, getExistingPluginsPaths, getFilePath, getIndexLock, getIssueSearcher, getPluginsRootPath, getReindexesSinceOptimize, isIndexingEnabled, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkOnlyIndexManager

public BulkOnlyIndexManager()
public default ctor for pico


BulkOnlyIndexManager

public BulkOnlyIndexManager(ApplicationProperties applicationProperties,
                            IssueIndexer issueIndexer)
private only for testing purposes (use the factory method to get an instance)

Method Detail

deIndex

public void deIndex(org.ofbiz.core.entity.GenericValue entity)
             throws IndexException
Description copied from interface: IssueIndexManager
Remove an issue from the search index.

Specified by:
deIndex in interface IssueIndexManager
Overrides:
deIndex in class DefaultIndexManager
Throws:
IndexException

reIndex

public void reIndex(org.ofbiz.core.entity.GenericValue entity)
             throws IndexException
Description copied from interface: IssueIndexManager
Reindex an issue (eg. after field updates).

Specified by:
reIndex in interface IssueIndexManager
Overrides:
reIndex in class DefaultIndexManager
Throws:
IndexException

reIndex

public void reIndex(Issue entity)
             throws IndexException
Description copied from interface: IssueIndexManager
Reindex an issue (eg. after field updates).

Specified by:
reIndex in interface IssueIndexManager
Overrides:
reIndex in class DefaultIndexManager
Throws:
IndexException

reIndexAll

public long reIndexAll()
                throws IndexException
Description copied from interface: IssueIndexManager
Reindex all issues.

Specified by:
reIndexAll in interface IssueIndexManager
Overrides:
reIndexAll in class DefaultIndexManager
Returns:
The number of milliseconds taken to reindex everything, or -1 if not indexing
Throws:
IndexException

reIndexAll

public long reIndexAll(com.atlassian.johnson.event.Event event)
                throws IndexException
Description copied from interface: IssueIndexManager
Reindex all issues.

Specified by:
reIndexAll in interface IssueIndexManager
Overrides:
reIndexAll in class DefaultIndexManager
Parameters:
event - Reindex Event that the caller has set (see source in IndexAdminImpl.doActivate()).
Returns:
Reindex time in ms.
Throws:
IndexException

reIndexIssueObjects

public long reIndexIssueObjects(Collection issueObjects)
                         throws IndexException
Description copied from interface: IssueIndexManager
Reindex a set of issues.

Specified by:
reIndexIssueObjects in interface IssueIndexManager
Overrides:
reIndexIssueObjects in class DefaultIndexManager
Parameters:
issueObjects - Set of Issues to reindex.
Returns:
Reindex time in ms.
Throws:
IndexException

reIndexIssues

public long reIndexIssues(IssuesIterable issuesIterable,
                          com.atlassian.johnson.event.Event event)
                   throws IndexException
Description copied from interface: IssueIndexManager
Reindex a list of issues, passing an optional event that will be set progress

Specified by:
reIndexIssues in interface IssueIndexManager
Overrides:
reIndexIssues in class DefaultIndexManager
event - Can be null, else progress will be sent to the event
Returns:
Reindex time in ms.
Throws:
IndexException

reIndexIssues

public long reIndexIssues(Collection issues)
                   throws IndexException
Description copied from interface: IssueIndexManager
Reindex a set of issues (GenericValues). Use IssueIndexManager.reIndexIssueObjects(Collection) instead when possible.

Specified by:
reIndexIssues in interface IssueIndexManager
Overrides:
reIndexIssues in class DefaultIndexManager
Parameters:
issues - The Issue GenericValues to reindex.
Returns:
Reindex time in ms.
Throws:
IndexException

optimize

public long optimize()
              throws IndexException
Description copied from interface: IssueIndexManager
Optimize the underlying indexes. Make the subsequent searching more efficient.

Specified by:
optimize in interface IssueIndexManager
Overrides:
optimize in class DefaultIndexManager
Returns:
the amount of time in millis this method took (because you are too lazy to time me), 0 if indexing is not enabled or -1 if we cannot obtain the index writeLock.
Throws:
IndexException - if the indexes are seriously in trouble


Copyright © 2002-2007 Atlassian. All Rights Reserved.