public class

DefaultIndexRecoveryManager

extends Object
implements IndexRecoveryManager
java.lang.Object
   ↳ com.atlassian.jira.index.ha.DefaultIndexRecoveryManager

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.index.ha.IndexRecoveryManager
Public Constructors
DefaultIndexRecoveryManager(SearchProvider searchProvider, OfBizDelegator delegator, IssueBatcherFactory issueBatcherFactory, IssueManager issueManager, IssueIndexer issueIndexer, IndexLifecycleManager indexLifecycleManager, IndexPathManager indexPathManager, IssueFactory issueFactory, SharedEntityIndexManager sharedEntityIndexManager, IndexingCounterManager indexingCounterManager, IssueIndexManager indexManager)
Public Methods
DateUtils.DateRange getDurationToRecover()
Gets the updated date range for issues that need to be re-indexed because the latest updates are missing from the index.
boolean isEmpty()
IndexCommandResult recoverIndexFromBackup(File recoveryFile, TaskProgressSink taskProgressSink)
Recovers an index from an index backup.
void reindexIssuesIn(DateUtils.DateRange range, TaskProgressSink taskProgressSink)
Reindex issues with last updated date within the following range The range is
from
Latest date in the index
to
Latest date in the database
The range can actually be negative, indicating there are indexed updates which do not belong and so may need to be removed.
int size()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.index.ha.IndexRecoveryManager
From interface com.atlassian.jira.util.collect.Sized

Public Constructors

public DefaultIndexRecoveryManager (SearchProvider searchProvider, OfBizDelegator delegator, IssueBatcherFactory issueBatcherFactory, IssueManager issueManager, IssueIndexer issueIndexer, IndexLifecycleManager indexLifecycleManager, IndexPathManager indexPathManager, IssueFactory issueFactory, SharedEntityIndexManager sharedEntityIndexManager, IndexingCounterManager indexingCounterManager, IssueIndexManager indexManager)

Public Methods

public DateUtils.DateRange getDurationToRecover ()

Gets the updated date range for issues that need to be re-indexed because the latest updates are missing from the index. The range is

from
Latest date in the index
to
Latest date in the database
The range can actually be negative, indicating there are indexed updates which do not belong and so may need to be removed.

Returns
  • Date range of issues that need to be re-indexed.

public boolean isEmpty ()

public IndexCommandResult recoverIndexFromBackup (File recoveryFile, TaskProgressSink taskProgressSink)

Recovers an index from an index backup.

Parameters
recoveryFile The backup file

public void reindexIssuesIn (DateUtils.DateRange range, TaskProgressSink taskProgressSink)

Reindex issues with last updated date within the following range The range is

from
Latest date in the index
to
Latest date in the database
The range can actually be negative, indicating there are indexed updates which do not belong and so may need to be removed.

Parameters
range Date range to recover
taskProgressSink A progress sink.

public int size ()