Package com.atlassian.jira.index.ha
Interface IndexRecoveryService
- All Superinterfaces:
Sized
- All Known Implementing Classes:
DefaultIndexRecoveryService
Manager to recover an index from a previous index backup
- Since:
- v6.2
-
Method Summary
Modifier and TypeMethodDescriptionGet the schedule configured for taking recovery snapshotsbooleanIs index recovery enabled.recoverIndexFromBackup(ApplicationUser user, Context context, I18nHelper i18n, String recoveryFilename, TaskProgressSink taskProgressSink) Recovers an index from an index backupvoidupdateRecoverySettings(ApplicationUser user, boolean recoveryEnabled, String cronExpression) Update the recovery settings
-
Method Details
-
recoverIndexFromBackup
IndexCommandResult recoverIndexFromBackup(ApplicationUser user, Context context, I18nHelper i18n, String recoveryFilename, TaskProgressSink taskProgressSink) throws IndexException Recovers an index from an index backup- Parameters:
user- the logged in usercontext- Contexti18n-recoveryFilename- The backup filetaskProgressSink-- Throws:
IndexException- If we are unable to recover the index
-
isRecoveryEnabled
Is index recovery enabled.- Returns:
- true if it is.
-
getSnapshotCronExpression
Get the schedule configured for taking recovery snapshots- Parameters:
user- the logged in user- Returns:
- interval in Millis or null if this is undefined
-
updateRecoverySettings
void updateRecoverySettings(ApplicationUser user, boolean recoveryEnabled, String cronExpression) throws Exception Update the recovery settings- Parameters:
user- the logged in userrecoveryEnabled- is recovery enabledcronExpression- Schedule at which to take snapshots- Throws:
Exception
-