public class

DefaultIndexCopyService

extends Object
implements IndexCopyService
java.lang.Object
   ↳ com.atlassian.jira.index.ha.DefaultIndexCopyService

Class Overview

Backs up the index to the shared home folder

Summary

Constants
String BACKUP_INDEX
String BACKUP_INDEX_DONE
Public Constructors
DefaultIndexCopyService(IndexPathManager indexPathManager, JiraHome jiraHome, IndexUtils indexUtils, MessageHandlerService messageHandlerService, EventPublisher eventPublisher, IndexRecoveryManager indexRecoveryManager, DelegatorInterface delegatorInterface, I18nHelper i18n, OfBizReplicatedIndexOperationStore ofBizNodeIndexOperationStore)
Public Methods
String backupIndex(String requestingNode)
Backs up all the index files from local home to a snapshot archive on the shared home.
String backupIndex(String requestingNode, IndexSnapshotContribution contribution)
Backup an index for replicating to another node
void restoreIndex(String filePath)
Restores a snapshot archive from the shared home into the local home.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.index.ha.IndexCopyService

Constants

public static final String BACKUP_INDEX

Constant Value: "Backup Index"

public static final String BACKUP_INDEX_DONE

Constant Value: "Index Backed Up"

Public Constructors

public DefaultIndexCopyService (IndexPathManager indexPathManager, JiraHome jiraHome, IndexUtils indexUtils, MessageHandlerService messageHandlerService, EventPublisher eventPublisher, IndexRecoveryManager indexRecoveryManager, DelegatorInterface delegatorInterface, I18nHelper i18n, OfBizReplicatedIndexOperationStore ofBizNodeIndexOperationStore)

Public Methods

public String backupIndex (String requestingNode)

Backs up all the index files from local home to a snapshot archive on the shared home.

Parameters
requestingNode Node requesting the index
Returns
  • the name of the backup file, or null if the backup did not occur

public String backupIndex (String requestingNode, IndexSnapshotContribution contribution)

Backup an index for replicating to another node

Parameters
requestingNode Node requesting the index
contribution an additional contribution to be added to the backup
Returns
  • the name of the backup file, or null if the backup did not occur

public void restoreIndex (String filePath)

Restores a snapshot archive from the shared home into the local home.

Parameters
filePath path of the zip file containing the index backup.