com.atlassian.jira.index.ha
Interface IndexRecoveryService

All Superinterfaces:
Sized
All Known Implementing Classes:
DefaultIndexRecoveryService

public interface IndexRecoveryService
extends Sized

Manager to recover an index from a previous index backup

Since:
v6.2

Method Summary
 Long getSnapshotInterval(ApplicationUser user)
          Get the interval 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, long snapshotInterval)
          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.
 
Methods inherited from interface com.atlassian.jira.util.collect.Sized
isEmpty, size
 

Method Detail

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 user
context - Context
i18n -
recoveryFilename - The backup file
taskProgressSink -
Throws:
IndexException - If we are unable to recover the index

validIndexZipFile

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

isRecoveryEnabled

boolean isRecoveryEnabled(ApplicationUser user)
Is index recovery enabled.

Returns:
true if it is.

getSnapshotInterval

@Nullable
Long getSnapshotInterval(ApplicationUser user)
Get the interval 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,
                            long snapshotInterval)
                            throws Exception
Update the recovery settings

Parameters:
user - the logged in user
recoveryEnabled - is recovery enabled
snapshotInterval - Interval at which ti take snapshots
Throws:
Exception


Copyright © 2002-2014 Atlassian. All Rights Reserved.