public class DefaultIndexRecoveryService extends Object implements IndexRecoveryService
| Constructor and Description |
|---|
DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager,
PermissionManager permissionManager,
IndexPathManager indexPathManager,
ServiceManager serviceManager,
FileFactory fileFactory,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
String |
getSnapshotCronExpression(ApplicationUser user)
Get the schedule configured for taking recovery snapshots
|
boolean |
isEmpty() |
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
|
int |
size() |
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.
|
public DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager, PermissionManager permissionManager, IndexPathManager indexPathManager, ServiceManager serviceManager, FileFactory fileFactory, com.atlassian.event.api.EventPublisher eventPublisher)
public IndexCommandResult recoverIndexFromBackup(ApplicationUser user, Context context, I18nHelper i18n, String recoveryFilename, TaskProgressSink taskProgressSink) throws IndexException
IndexRecoveryServicerecoverIndexFromBackup in interface IndexRecoveryServiceuser - the logged in usercontext - ContextrecoveryFilename - The backup fileIndexException - If we are unable to recover the indexpublic boolean validIndexZipFile(ApplicationUser user, File zipFile)
IndexRecoveryServicevalidIndexZipFile in interface IndexRecoveryServiceuser - the logged in userzipFile - File to validatepublic void updateRecoverySettings(ApplicationUser user, boolean recoveryEnabled, String cronExpression) throws Exception
IndexRecoveryServiceupdateRecoverySettings in interface IndexRecoveryServiceuser - the logged in userrecoveryEnabled - is recovery enabledcronExpression - Schedule at which to take snapshotsExceptionpublic boolean isRecoveryEnabled(ApplicationUser user)
IndexRecoveryServiceisRecoveryEnabled in interface IndexRecoveryServicepublic String getSnapshotCronExpression(ApplicationUser user)
IndexRecoveryServicegetSnapshotCronExpression in interface IndexRecoveryServiceuser - the logged in userCopyright © 2002-2017 Atlassian. All Rights Reserved.