Package com.atlassian.jira.issue.index
Class BulkOnlyIndexManager
java.lang.Object
com.atlassian.jira.issue.index.IndexManagerBase
com.atlassian.jira.issue.index.BulkOnlyIndexManager
- All Implemented Interfaces:
InternalIndexingService,IssueIndexingService,IssueIndexManager,JiraIndexManager,IndexSearcherProvider,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.IndexManagerBase
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, IndexConsistencyChecker indexConsistencyChecker) private only for testing purposes (use the factory method to get an instance) -
Method Summary
Modifier and TypeMethodDescriptionvoidRemove an issue from the search index.voiddeIndex(org.ofbiz.core.entity.GenericValue entity) Remove an issue from the search index.voidhold()Temporarily suspend indexing on this thread.booleanisHeld()Return true if the index is held on this thread.longoptimize()Optimize the underlying indexes.voidReindex an issue (eg.voidreIndex(org.ofbiz.core.entity.GenericValue entity) Reindex an issue (eg.longReindex all issues.longreIndexAll(com.atlassian.johnson.event.Event event) longreIndexIssueObjects(Collection<? extends Issue> issueObjects) Reindex a set of issues.longreIndexIssues(IssuesIterable issuesIterable, com.atlassian.johnson.event.Event event) longreIndexIssues(Collection<org.ofbiz.core.entity.GenericValue> issues) Reindex a set of issues (GenericValues).longrelease()Release indexing on this thread.toString()Methods inherited from class com.atlassian.jira.issue.index.IndexManagerBase
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, withReindexLockMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.jira.issue.index.IssueIndexingService
deIndex, deIndexIssueObjectsMethods inherited from interface com.atlassian.jira.issue.index.JiraIndexManager
get
-
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, IndexConsistencyChecker indexConsistencyChecker) private only for testing purposes (use the factory method to get an instance)
-
-
Method Details
-
deIndex
Description copied from interface:IssueIndexingServiceRemove an issue from the search index.- Specified by:
deIndexin interfaceIssueIndexingService- Overrides:
deIndexin classIndexManagerBase- Throws:
IndexException
-
deIndex
Description copied from interface:IssueIndexManagerRemove an issue from the search index.- Specified by:
deIndexin interfaceIssueIndexManager- Overrides:
deIndexin classIndexManagerBase- Throws:
IndexException
-
reIndex
Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexManager- Overrides:
reIndexin classIndexManagerBase- Throws:
IndexException
-
reIndex
Description copied from interface:IssueIndexManagerReindex an issue (eg. after field updates).- Specified by:
reIndexin interfaceIssueIndexingService- Specified by:
reIndexin interfaceIssueIndexManager- Overrides:
reIndexin classIndexManagerBase- Throws:
IndexException
-
reIndexAll
Description copied from interface:IssueIndexManagerReindex all issues.- Specified by:
reIndexAllin interfaceIssueIndexingService- Specified by:
reIndexAllin interfaceIssueIndexManager- Overrides:
reIndexAllin classIndexManagerBase- Returns:
- The number of milliseconds taken to reindex everything, or -1 if not indexing
- Throws:
IndexException
-
reIndexAll
- Throws:
IndexException
-
reIndexIssueObjects
Description copied from interface:IssueIndexManagerReindex a set of issues.- Specified by:
reIndexIssueObjectsin interfaceIssueIndexingService- Specified by:
reIndexIssueObjectsin interfaceIssueIndexManager- Overrides:
reIndexIssueObjectsin classIndexManagerBase- Parameters:
issueObjects- Set ofIssues 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:IssueIndexManagerReindex a set of issues (GenericValues). UseIssueIndexManager.reIndexIssueObjects(Collection)instead when possible.- Specified by:
reIndexIssuesin interfaceIssueIndexManager- Overrides:
reIndexIssuesin classIndexManagerBase- Parameters:
issues- The IssueGenericValues to reindex.- Returns:
- Reindex time in ms.
- Throws:
IndexException
-
hold
public void hold()Description copied from interface:IssueIndexManagerTemporarily suspend indexing on this thread. All index requests will be queued and processed when release is called.- Specified by:
holdin interfaceIssueIndexingService- Specified by:
holdin interfaceIssueIndexManager- Overrides:
holdin classIndexManagerBase
-
isHeld
public boolean isHeld()Description copied from interface:IssueIndexManagerReturn true if the index is held on this thread.- Specified by:
isHeldin interfaceIssueIndexingService- Specified by:
isHeldin interfaceIssueIndexManager- Overrides:
isHeldin classIndexManagerBase
-
release
Description copied from interface:IssueIndexManagerRelease indexing on this thread. All queued index requests will be processed.- Specified by:
releasein interfaceIssueIndexingService- Specified by:
releasein interfaceIssueIndexManager- Overrides:
releasein classIndexManagerBase- Returns:
- Reindex time in ms.
- Throws:
IndexException- if an error occurs
-
optimize
public long optimize()Description copied from interface:IndexLifecycleManagerOptimize the underlying indexes. Make the subsequent searching more efficient.- Specified by:
optimizein interfaceIndexLifecycleManager- Overrides:
optimizein classIndexManagerBase- 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:
toStringin classIndexManagerBase
-