public interface

IndexRecoveryService

implements Sized
com.atlassian.jira.index.ha.IndexRecoveryService
Known Indirect Subclasses

Class Overview

Manager to recover an index from a previous index backup

Summary

Public Methods
@Nullable String getSnapshotCronExpression(ApplicationUser user)
Get the schedule configured for taking recovery snapshots
boolean isRecoveryEnabled(ApplicationUser user)
Is index recovery enabled.
IndexCommandResult recoverIndexFromBackup(ApplicationUser user, Context context, I18nHelper i18n, String recoveryFilename, TaskProgressSink taskProgressSink)
Recovers an index from an index backup
void updateRecoverySettings(ApplicationUser user, boolean recoveryEnabled, String cronExpression)
Update the recovery settings
boolean validIndexZipFile(ApplicationUser user, File zipFile)
Validate the passed in file to be a valid zip file containing a set of Lucene Index directories.
[Expand]
Inherited Methods
From interface com.atlassian.jira.util.collect.Sized

Public Methods

@Nullable public String getSnapshotCronExpression (ApplicationUser user)

Get the schedule configured for taking recovery snapshots

Parameters
user the logged in user
Returns
  • interval in Millis or null if this is undefined

public boolean isRecoveryEnabled (ApplicationUser user)

Is index recovery enabled.

Returns
  • true if it is.

public IndexCommandResult recoverIndexFromBackup (ApplicationUser user, Context context, I18nHelper i18n, String recoveryFilename, TaskProgressSink taskProgressSink)

Recovers an index from an index backup

Parameters
user the logged in user
context Context
recoveryFilename The backup file
Throws
IndexException If we are unable to recover the index

public void updateRecoverySettings (ApplicationUser user, boolean recoveryEnabled, String cronExpression)

Update the recovery settings

Parameters
user the logged in user
recoveryEnabled is recovery enabled
cronExpression Schedule at which to take snapshots
Throws
Exception

public boolean validIndexZipFile (ApplicationUser user, File zipFile)

Validate the passed in file to be a valid zip file containing a set of Lucene Index directories.

Parameters
user the logged in user
zipFile File to validate
Returns
  • true if all OK