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, Sized, IndexLifecycleManager, Shutdown

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
 
Fields inherited from interface com.atlassian.jira.issue.index.IssueIndexManager
LUCENE_VERSION
 
Constructor Summary
BulkOnlyIndexManager(IndexingConfiguration properties, IssueIndexer issueIndexer, IndexPathManager indexPathManager, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager)
          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.
 void deIndex(Issue issue)
          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)
           
 long reIndexIssueObjects(Collection<? extends Issue> issueObjects)
          Reindex a set of issues.
 long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues)
          Reindex a set of issues (GenericValues).
 long reIndexIssues(IssuesIterable issuesIterable, com.atlassian.johnson.event.Event event)
           
 String toString()
           
 
Methods inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
activate, deactivate, flushThreadLocalSearchers, getAllIndexPaths, getAnalyzerForIndexing, getAnalyzerForSearching, getChangeHistorySearcher, getCommentSearcher, getExistingPluginsPaths, getIssueSearcher, getPluginsRootPath, isEmpty, isIndexingEnabled, reIndexAll, reIndexIssues, shutdown, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BulkOnlyIndexManager

public BulkOnlyIndexManager(IndexingConfiguration properties,
                            IssueIndexer issueIndexer,
                            IndexPathManager indexPathManager,
                            ReindexMessageManager reindexMessageManager,
                            com.atlassian.event.api.EventPublisher eventPublisher,
                            ListenerManager listenerManager)
private only for testing purposes (use the factory method to get an instance)

Method Detail

deIndex

public void deIndex(Issue issue)
             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

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
Throws:
IndexException

reIndexIssueObjects

public long reIndexIssueObjects(Collection<? extends Issue> 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
Throws:
IndexException

reIndexIssues

public long reIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> 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()
Description copied from interface: IndexLifecycleManager
Optimize the underlying indexes. Make the subsequent searching more efficient.

Specified by:
optimize in interface IndexLifecycleManager
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.

toString

public String toString()
Overrides:
toString in class DefaultIndexManager


Copyright © 2002-2012 Atlassian. All Rights Reserved.