Package com.atlassian.jira.issue.index
Class BulkOnlyIndexManager
java.lang.Object
com.atlassian.jira.issue.index.DefaultIndexManager
com.atlassian.jira.issue.index.BulkOnlyIndexManager
- All Implemented Interfaces:
InternalIndexingService
,IssueIndexingService
,IssueIndexManager
,Sized
,IndexLifecycleManager
,Shutdown
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
-
Constructor Summary
ConstructorsConstructorDescriptionBulkOnlyIndexManager
(IndexingConfiguration properties, IssueIndexer issueIndexer, IndexPathManager indexPathManager, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ArchivingDao archivingDao, IssueManager issueManager, SearcherCache searcherCache, TimeTrackingConfiguration timeTrackingConfiguration, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, ArchivingLicenseCheck archivingLicenseCheck, FeatureManager featureManager) private only for testing purposes (use the factory method to get an instance) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Remove an issue from the search index.void
deIndex
(org.ofbiz.core.entity.GenericValue entity) Remove an issue from the search index.void
hold()
Temporarily suspend indexing on this thread.boolean
isHeld()
Return true if the index is held.long
optimize()
Optimize the underlying indexes.void
Reindex an issue (eg.void
reIndex
(org.ofbiz.core.entity.GenericValue entity) Reindex an issue (eg.long
Reindex all issues.long
reIndexAll
(com.atlassian.johnson.event.Event event) long
reIndexIssueObjects
(Collection<? extends Issue> issueObjects) Reindex a set of issues.long
reIndexIssues
(IssuesIterable issuesIterable, com.atlassian.johnson.event.Event event) long
reIndexIssues
(Collection<org.ofbiz.core.entity.GenericValue> issues) Reindex a set of issues (GenericValues).long
release()
Release indexing on this thread.toString()
Methods inherited from class com.atlassian.jira.issue.index.DefaultIndexManager
activate, activate, conditionalUpdateWithVersion, conditionalUpdateWithVersion, deactivate, deIndex, deIndexComments, deIndexIssueObjectsById, deIndexWorklogs, getAllIndexPaths, getAnalyzerForIndexing, getAnalyzerForSearching, getChangeHistorySearcher, getCommentSearcher, getEntitySearcher, getExistingPluginsPaths, getIssueSearcher, getLatestIndexDate, getPluginsRootPath, getWorklogSearcher, isEmpty, isIndexAvailable, isIndexConsistent, reIndex, reIndex, reIndexAll, reIndexAll, reIndexAll, reIndexAll, reIndexAll, reIndexAll, reIndexAllIssuesInBackground, reIndexComments, reIndexComments, reIndexComments, reindexCommentsInParallel, reIndexIssueObjects, reIndexIssueObjects, reIndexIssueObjects, reIndexIssueObjects, reIndexIssues, reIndexIssues, reIndexIssues, reIndexIssues, reIndexIssues, reindexIssuesBatchMode, reIndexIssuesInBackground, reIndexWorklogs, reIndexWorklogs, reIndexWorklogs, reindexWorklogsInParallel, shutdown, size, unconditionallyReindexIssuesAndRelatedEntitiesLocally, withReindexLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.jira.issue.index.IssueIndexingService
deIndex, deIndexIssueObjects
-
Constructor Details
-
BulkOnlyIndexManager
public BulkOnlyIndexManager(IndexingConfiguration properties, IssueIndexer issueIndexer, IndexPathManager indexPathManager, ReindexMessageManager reindexMessageManager, com.atlassian.event.api.EventPublisher eventPublisher, ListenerManager listenerManager, ProjectManager projectManager, TaskManager taskManager, OfBizDelegator ofBizDelegator, ArchivingDao archivingDao, IssueManager issueManager, SearcherCache searcherCache, TimeTrackingConfiguration timeTrackingConfiguration, IndexingLanguageSetting indexingLanguageSetting, ReindexingAuditHandler reindexingAuditHandler, ArchivingLicenseCheck archivingLicenseCheck, FeatureManager featureManager) private only for testing purposes (use the factory method to get an instance)
-
-
Method Details
-
deIndex
Description copied from interface:IssueIndexingService
Remove an issue from the search index.- Specified by:
deIndex
in interfaceIssueIndexingService
- Overrides:
deIndex
in classDefaultIndexManager
- Throws:
IndexException
-
deIndex
Description copied from interface:IssueIndexManager
Remove an issue from the search index.- Specified by:
deIndex
in interfaceIssueIndexManager
- Overrides:
deIndex
in classDefaultIndexManager
- Throws:
IndexException
-
reIndex
Description copied from interface:IssueIndexManager
Reindex an issue (eg. after field updates).- Specified by:
reIndex
in interfaceIssueIndexManager
- Overrides:
reIndex
in classDefaultIndexManager
- Throws:
IndexException
-
reIndex
Description copied from interface:IssueIndexManager
Reindex an issue (eg. after field updates).- Specified by:
reIndex
in interfaceIssueIndexingService
- Specified by:
reIndex
in interfaceIssueIndexManager
- Overrides:
reIndex
in classDefaultIndexManager
- Throws:
IndexException
-
reIndexAll
Description copied from interface:IssueIndexManager
Reindex all issues.- Specified by:
reIndexAll
in interfaceIssueIndexingService
- Specified by:
reIndexAll
in interfaceIssueIndexManager
- Overrides:
reIndexAll
in classDefaultIndexManager
- Returns:
- The number of milliseconds taken to reindex everything, or -1 if not indexing
- Throws:
IndexException
-
reIndexAll
- Throws:
IndexException
-
reIndexIssueObjects
Description copied from interface:IssueIndexManager
Reindex a set of issues.- Specified by:
reIndexIssueObjects
in interfaceIssueIndexingService
- Specified by:
reIndexIssueObjects
in interfaceIssueIndexManager
- Overrides:
reIndexIssueObjects
in classDefaultIndexManager
- Parameters:
issueObjects
- Set ofIssue
s 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). UseIssueIndexManager.reIndexIssueObjects(Collection)
instead when possible.- Specified by:
reIndexIssues
in interfaceIssueIndexManager
- Overrides:
reIndexIssues
in classDefaultIndexManager
- Parameters:
issues
- The IssueGenericValue
s to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
hold
public void hold()Description copied from interface:IssueIndexManager
Temporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.- Specified by:
hold
in interfaceIssueIndexManager
- Overrides:
hold
in classDefaultIndexManager
-
isHeld
public boolean isHeld()Description copied from interface:IssueIndexManager
Return true if the index is held.- Specified by:
isHeld
in interfaceIssueIndexManager
- Overrides:
isHeld
in classDefaultIndexManager
-
release
Description copied from interface:IssueIndexManager
Release indexing on this thread. All queued index requests will be processed.- Specified by:
release
in interfaceIssueIndexManager
- Overrides:
release
in classDefaultIndexManager
- Returns:
- Reindex time in ms.
- Throws:
IndexException
- if an error occurs
-
optimize
public long optimize()Description copied from interface:IndexLifecycleManager
Optimize the underlying indexes. Make the subsequent searching more efficient.- Specified by:
optimize
in interfaceIndexLifecycleManager
- Overrides:
optimize
in classDefaultIndexManager
- 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
- Overrides:
toString
in classDefaultIndexManager
-