Class OpenSearchProjectReindexServiceImpl
java.lang.Object
com.atlassian.jira.bc.project.index.OpenSearchProjectReindexServiceImpl
- All Implemented Interfaces:
ProjectReindexService
OpenSearch-specific implementation of
ProjectReindexService.
This service performs project reindexing without replication and ensures that only one reindexing task runs for a given project across the cluster.
- Since:
- 11.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JiraAuthenticationContextprotected final TaskManager -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchProjectReindexServiceImpl(JiraAuthenticationContext authenticationContext, TaskManager taskManager, IssueIndexer issueIndexer, OfBizDelegator ofBizDelegator, IssueBatcherFactory issueBatcherFactory, IssueManager issueManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper.BeanFactory i18nBeanFactory, ProjectEventHandler projectEventHandler, IssueDocumentSearchService issueDocumentSearchService) -
Method Summary
Modifier and TypeMethodDescriptionprotected I18nHelperGets the I18nHelper instance.getRunningTask(Project project) getTaskContext(Project project) Gets the task context for the given project.protected StringGets the localized text for the given key and parameter.booleanisReindexPossible(Project project) Reindexes the specified project without replication.User should never call this method in OpenSearch environments.
-
Field Details
-
authenticationContext
-
taskManager
-
-
Constructor Details
-
OpenSearchProjectReindexServiceImpl
public OpenSearchProjectReindexServiceImpl(JiraAuthenticationContext authenticationContext, TaskManager taskManager, IssueIndexer issueIndexer, OfBizDelegator ofBizDelegator, IssueBatcherFactory issueBatcherFactory, IssueManager issueManager, com.atlassian.event.api.EventPublisher eventPublisher, I18nHelper.BeanFactory i18nBeanFactory, ProjectEventHandler projectEventHandler, IssueDocumentSearchService issueDocumentSearchService)
-
-
Method Details
-
reindex
Reindexes the specified project without replication.- Parameters:
project- the project to reindex- Returns:
- the progress URL for tracking the reindex operation
-
reindex
User should never call this method in OpenSearch environments.- Parameters:
project- the project needs to be re-indexedshouldReplicate- whether the index changes should be replicated to the other nodes in the cluster.- Returns:
- the project reindex progress url
-
getTaskContext
Gets the task context for the given project.This method must be implemented by subclasses to provide the appropriate task context based on their specific requirements (e.g., with or without node ID).
- Parameters:
project- the project to get the task context for- Returns:
- the task context
-
isReindexPossible
- Specified by:
isReindexPossiblein interfaceProjectReindexService
-
getRunningTask
- Specified by:
getRunningTaskin interfaceProjectReindexService
-
getText
Gets the localized text for the given key and parameter.- Parameters:
key- the text keyparameter- the parameter to substitute- Returns:
- the localized text
-
getI18nHelper
Gets the I18nHelper instance.- Returns:
- the I18nHelper instance
-