Interface BackupRestoreJobDao

All Known Implementing Classes:
DefaultBackupRestoreJobDao

public interface BackupRestoreJobDao
Dao for backup/restore jobs. Interface since 9.3.
Since:
8.3.0
  • Method Details

    • getById

      BackupRestoreJob getById(Long jobId)
    • save

    • update

      void update(BackupRestoreJob job)
    • updateInNewTransaction

      void updateInNewTransaction(BackupRestoreJob job)
    • findJobs

      List<BackupRestoreJob> findJobs(BackupRestoreJobsSearchFilter backupRestoreJobsSearchFilter)
    • cancelRunningJobWithOptimisticLock

      boolean cancelRunningJobWithOptimisticLock(long jobId, String terminator)
      Cancels the job only if it's state was not modified.
      Parameters:
      jobId - job id
      terminator - user who wants to cancel the job
      Returns:
      true if job was cancelled
    • cancelQueuedJobWithOptimisticLock

      boolean cancelQueuedJobWithOptimisticLock(long jobId, String terminator)
      Cancels the job only if it's state was not modified.
      Parameters:
      jobId - job id
      terminator - user who wants to cancel the job
      Returns:
      true if job was cancelled
    • startProcessingJobWithOptimisticLock

      boolean startProcessingJobWithOptimisticLock(long jobId)
      Changes jobs state to PROCESSING only if it's state was not modified.
      Parameters:
      jobId - job id
      Returns:
      true if job changed it's state to processing
    • getNextJobForProcessing

      BackupRestoreJob getNextJobForProcessing()
    • getNextActiveJob

      BackupRestoreJob getNextActiveJob()
    • getSettingsById

      BackupRestoreJobSettingsRecord getSettingsById(long id) throws IllegalStateException
      Throws:
      IllegalStateException
    • getStatisticsById

      BackupRestoreJobStatisticsRecord getStatisticsById(long id)
    • save

      Long save(BackupRestoreJobSettingsRecord backupRestoreJobSettingsRecord)
    • save

      void save(BackupRestoreJobStatisticsRecord statisticsRecord)
    • updateStatistics

      int updateStatistics(long jobId, String statistics)
    • saveAndKeepId

      BackupRestoreJob saveAndKeepId(BackupRestoreJob job)
      Regular save generates the new id if the object does not exist. This method reuses existing id.
    • findJobsWithExpiredZips

      List<BackupRestoreJob> findJobsWithExpiredZips()
      This gets all jobs where the file delete time is expired and the backup zip file still exists
      Returns:
      list of jobs to delete
    • delete

      void delete(long jobId)
      Deletes given job with its settings and statistics
      Parameters:
      jobId - - job id of the job to be deleted