public class DefaultIndexRecoveryService extends Object implements IndexRecoveryService
| Constructor and Description |
|---|
DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager,
PermissionManager permissionManager,
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
|
public DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager, PermissionManager permissionManager, 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 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-2019 Atlassian. All Rights Reserved.