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 Details

    • 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
    • isRecoveryEnabled

      boolean isRecoveryEnabled(ApplicationUser user)
      Is index recovery enabled.
      Returns:
      true if it is.
    • getSnapshotCronExpression

      @Nullable String getSnapshotCronExpression(ApplicationUser user)
      Get the schedule 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, String cronExpression) throws Exception
      Update the recovery settings
      Parameters:
      user - the logged in user
      recoveryEnabled - is recovery enabled
      cronExpression - Schedule at which to take snapshots
      Throws:
      Exception