|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.index.ha.DefaultIndexRecoveryService
public class DefaultIndexRecoveryService
Service for recovering an Index.
Constructor Summary | |
---|---|
DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager,
PermissionManager permissionManager,
IndexPathManager indexPathManager,
ServiceManager serviceManager,
FileFactory fileFactory)
|
Method Summary | |
---|---|
Long |
getSnapshotInterval(ApplicationUser user)
Get the interval 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,
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultIndexRecoveryService(IndexRecoveryManager indexRecoveryManager, PermissionManager permissionManager, IndexPathManager indexPathManager, ServiceManager serviceManager, FileFactory fileFactory)
Method Detail |
---|
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 file
IndexException
- If we are unable to recover the indexpublic boolean validIndexZipFile(ApplicationUser user, File zipFile)
IndexRecoveryService
validIndexZipFile
in interface IndexRecoveryService
user
- the logged in userzipFile
- File to validate
public int size()
size
in interface Sized
public boolean isEmpty()
isEmpty
in interface Sized
public void updateRecoverySettings(ApplicationUser user, boolean recoveryEnabled, long snapshotInterval) throws Exception
IndexRecoveryService
updateRecoverySettings
in interface IndexRecoveryService
user
- the logged in userrecoveryEnabled
- is recovery enabledsnapshotInterval
- Interval at which ti take snapshots
Exception
public boolean isRecoveryEnabled(ApplicationUser user)
IndexRecoveryService
isRecoveryEnabled
in interface IndexRecoveryService
public Long getSnapshotInterval(ApplicationUser user)
IndexRecoveryService
getSnapshotInterval
in interface IndexRecoveryService
user
- the logged in user
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |