public class AtlassianSchedulerBackupScheduler extends Object implements BackupScheduler
BackupScheduler| Modifier and Type | Field and Description |
|---|---|
static String |
ENABLED_PROPERTY |
static String |
HOUR_PROPERTY |
static com.atlassian.scheduler.config.JobId |
JOB_ID |
static com.atlassian.scheduler.config.JobRunnerKey |
JOB_RUNNER_KEY |
| Constructor and Description |
|---|
AtlassianSchedulerBackupScheduler(com.atlassian.scheduler.SchedulerService schedulerService,
PropertyManager propertyManager,
BackupManager backupManager,
com.atlassian.event.api.EventPublisher eventPublisher,
BackupFileStore backupFileStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Disable automated backups.
|
void |
enable()
Enable automated backups.
|
int |
getHourToRun()
Return the time of day at which the automated backups are run
|
boolean |
isEnabled()
Return whether automated backup is enabled
|
void |
onApplicationReady(ApplicationReadyEvent applicationReadyEvent) |
void |
onXMLRestore(XMLRestoreFinishedEvent restoreFinishedEvent) |
void |
registerListener() |
protected void |
scheduleJob(int timeOfDay) |
void |
setHourToRun(int timeOfDay)
Set the time of day at which the automated backups are run.
|
void |
unregisterListener() |
public static final String ENABLED_PROPERTY
public static final String HOUR_PROPERTY
public static final com.atlassian.scheduler.config.JobId JOB_ID
public static final com.atlassian.scheduler.config.JobRunnerKey JOB_RUNNER_KEY
public AtlassianSchedulerBackupScheduler(com.atlassian.scheduler.SchedulerService schedulerService,
PropertyManager propertyManager,
BackupManager backupManager,
com.atlassian.event.api.EventPublisher eventPublisher,
BackupFileStore backupFileStore)
@PostConstruct public void registerListener()
@PreDestroy public void unregisterListener()
@EventListener public void onApplicationReady(ApplicationReadyEvent applicationReadyEvent)
@EventListener public void onXMLRestore(XMLRestoreFinishedEvent restoreFinishedEvent)
public boolean isEnabled()
BackupSchedulerisEnabled in interface BackupSchedulerpublic void enable()
throws ScheduledBackupException
BackupSchedulerenable in interface BackupSchedulerScheduledBackupException - if there was a problem scheduling the automated backup jobpublic void disable()
throws ScheduledBackupException
BackupSchedulerdisable in interface BackupSchedulerScheduledBackupException - if there was a problem scheduling the automated backup jobpublic int getHourToRun()
BackupSchedulergetHourToRun in interface BackupSchedulerpublic void setHourToRun(int timeOfDay)
throws ScheduledBackupException
BackupSchedulersetHourToRun in interface BackupSchedulertimeOfDay - a valid time (must be between 0 and 23)ScheduledBackupException - if there was a problem re-scheduling the automated backup jobprotected void scheduleJob(int timeOfDay)
throws ParseException,
com.atlassian.scheduler.SchedulerServiceException
ParseExceptioncom.atlassian.scheduler.SchedulerServiceExceptionCopyright © 2018 Atlassian. All rights reserved.