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
IndexRecoveryService
recoverIndexFromBackup
in interface IndexRecoveryService
user
- 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
IndexRecoveryService
updateRecoverySettings
in interface IndexRecoveryService
user
- the logged in userrecoveryEnabled
- is recovery enabledcronExpression
- Schedule at which to take snapshotsException
public boolean isRecoveryEnabled(ApplicationUser user)
IndexRecoveryService
isRecoveryEnabled
in interface IndexRecoveryService
public String getSnapshotCronExpression(ApplicationUser user)
IndexRecoveryService
getSnapshotCronExpression
in interface IndexRecoveryService
user
- the logged in userCopyright © 2002-2022 Atlassian. All Rights Reserved.