Class AtlassianSchedulerBackupScheduler
java.lang.Object
com.atlassian.crowd.manager.backup.AtlassianSchedulerBackupScheduler
- All Implemented Interfaces:
BackupScheduler
Atlassian Scheduler specific implementation of
BackupScheduler
- Since:
- v2.8
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.atlassian.scheduler.config.JobId
static final com.atlassian.scheduler.config.JobRunnerKey
-
Constructor Summary
ConstructorDescriptionAtlassianSchedulerBackupScheduler
(com.atlassian.scheduler.SchedulerService schedulerService, PropertyManager propertyManager, BackupManager backupManager, com.atlassian.event.api.EventPublisher eventPublisher, BackupFileStore backupFileStore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Disable automated backups.void
enable()
Enable automated backups.boolean
Return whether automated backup is enabledvoid
onApplicationReady
(ApplicationReadyEvent applicationReadyEvent) void
onXMLRestore
(XMLRestoreFinishedEvent restoreFinishedEvent) void
void
reschedule
(BackupConfiguration backupConfiguration) Reschedules automated backups job by given configurationprotected void
scheduleJob
(int hour, int minute) void
-
Field Details
-
JOB_ID
public static final com.atlassian.scheduler.config.JobId JOB_ID -
JOB_RUNNER_KEY
public static final com.atlassian.scheduler.config.JobRunnerKey JOB_RUNNER_KEY
-
-
Constructor Details
-
AtlassianSchedulerBackupScheduler
public AtlassianSchedulerBackupScheduler(com.atlassian.scheduler.SchedulerService schedulerService, PropertyManager propertyManager, BackupManager backupManager, com.atlassian.event.api.EventPublisher eventPublisher, BackupFileStore backupFileStore)
-
-
Method Details
-
registerListener
@PostConstruct public void registerListener() -
unregisterListener
@PreDestroy public void unregisterListener() -
onApplicationReady
-
onXMLRestore
-
isEnabled
public boolean isEnabled()Description copied from interface:BackupScheduler
Return whether automated backup is enabled- Specified by:
isEnabled
in interfaceBackupScheduler
- Returns:
- true if automated backup is enabled
-
enable
Description copied from interface:BackupScheduler
Enable automated backups.- Specified by:
enable
in interfaceBackupScheduler
- Throws:
ScheduledBackupException
- if there was a problem scheduling the automated backup job
-
disable
Description copied from interface:BackupScheduler
Disable automated backups.- Specified by:
disable
in interfaceBackupScheduler
- Throws:
ScheduledBackupException
- if there was a problem scheduling the automated backup job
-
reschedule
Description copied from interface:BackupScheduler
Reschedules automated backups job by given configuration- Specified by:
reschedule
in interfaceBackupScheduler
- Parameters:
backupConfiguration
- Backup configuration used to rescheduled job- Throws:
ScheduledBackupException
- if there was a problem rescheduling the automated backup job
-
scheduleJob
protected void scheduleJob(int hour, int minute) throws com.atlassian.scheduler.SchedulerServiceException - Throws:
com.atlassian.scheduler.SchedulerServiceException
-