Interface BackupRestoreJobDao
- All Known Implementing Classes:
DefaultBackupRestoreJobDao
public interface BackupRestoreJobDao
Dao for backup/restore jobs.
Interface since 9.3.
- Since:
- 8.3.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
cancelQueuedJobWithOptimisticLock
(long jobId, String terminator) Cancels the job only if it's state was not modified.boolean
cancelRunningJobWithOptimisticLock
(long jobId, String terminator) Cancels the job only if it's state was not modified.void
delete
(long jobId) Deletes given job with its settings and statisticsfindJobs
(BackupRestoreJobsSearchFilter backupRestoreJobsSearchFilter) This gets all jobs where the file delete time is expired and the backup zip file still existsgetSettingsById
(long id) getStatisticsById
(long id) save
(BackupRestoreJob job) save
(BackupRestoreJobSettingsRecord backupRestoreJobSettingsRecord) void
save
(BackupRestoreJobStatisticsRecord statisticsRecord) Regular save generates the new id if the object does not exist.boolean
startProcessingJobWithOptimisticLock
(long jobId) Changes jobs state to PROCESSING only if it's state was not modified.void
update
(BackupRestoreJob job) void
int
updateStatistics
(long jobId, String statistics)
-
Method Details
-
getById
-
save
-
update
-
updateInNewTransaction
-
findJobs
-
cancelRunningJobWithOptimisticLock
Cancels the job only if it's state was not modified.- Parameters:
jobId
- job idterminator
- user who wants to cancel the job- Returns:
- true if job was cancelled
-
cancelQueuedJobWithOptimisticLock
Cancels the job only if it's state was not modified.- Parameters:
jobId
- job idterminator
- 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
- Throws:
IllegalStateException
-
getStatisticsById
-
save
-
save
-
updateStatistics
-
saveAndKeepId
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
-