public class DefaultScheduledJobManager extends Object implements ScheduledJobManager
| Constructor and Description |
|---|
DefaultScheduledJobManager(ScheduledJobDao jobDAO,
org.quartz.Scheduler scheduler,
com.atlassian.scheduler.SchedulerService schedulerService,
ManagedScheduledJobRegistry jobRegistry,
AuditService auditService,
ScheduleJobStatusManager statusManager,
com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable(ScheduledJobKey key)
Disables the specified job, and removes it from the scheduler.
|
void |
disableJob(ScheduledJobKey key) |
void |
enable(ScheduledJobKey key)
Enables the specified job, and adds it to the scheduler.
|
void |
enableJob(ScheduledJobKey key) |
String |
getCronExpression(ScheduledJobKey key)
Gets the currently configured cron expression, or the default value if none has been configured.
|
Long |
getRepeatInterval(ScheduledJobKey key)
Gets the currently configured repeat interval, or the default value if none has been configured.
|
ScheduledJobStatus |
getScheduledJob(ScheduledJobKey key)
Gets the current status for a single scheduled job.
|
List<ScheduledJobStatus> |
getScheduledJobs()
Gets the list of managed job status.
|
static ScheduledJobKey |
jobIdToScheduledJobKeyWithoutRunNowSuffix(com.atlassian.scheduler.config.JobId jobId)
See the implementation of
runNow(com.atlassian.confluence.schedule.ScheduledJobKey). |
void |
runNow(ScheduledJobKey key)
Schedules the specified to run immediately.
|
static com.atlassian.scheduler.config.JobId |
scheduledJobKeyToJobIdWithRunNowSuffix(ScheduledJobKey scheduledJobKey)
See the implementation of
runNow(com.atlassian.confluence.schedule.ScheduledJobKey). |
Date |
updateCronJobSchedule(ScheduledJobKey key,
String newCronSchedule)
Updates stored schedule.
|
Date |
updateCronSchedule(ScheduledJobKey key,
String newCronSchedule) |
void |
updateDisabledJobExecutionStatus(ScheduledJobKey key,
ScheduledJobStatus jobStatus) |
void |
updateEnabledJobExecutionStatus(ScheduledJobKey key,
ScheduledJobStatus jobStatus) |
Date |
updateSimpleJobSchedule(ScheduledJobKey key,
long repeatInterval)
Updates stored schedule.
|
Date |
updateSimpleSchedule(ScheduledJobKey key,
long repeatInterval) |
public DefaultScheduledJobManager(ScheduledJobDao jobDAO, org.quartz.Scheduler scheduler, com.atlassian.scheduler.SchedulerService schedulerService, ManagedScheduledJobRegistry jobRegistry, AuditService auditService, ScheduleJobStatusManager statusManager, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager, com.atlassian.event.api.EventPublisher eventPublisher)
public List<ScheduledJobStatus> getScheduledJobs()
ScheduledJobManagergetScheduledJobs in interface ScheduledJobManagerpublic ScheduledJobStatus getScheduledJob(ScheduledJobKey key)
ScheduledJobManagergetScheduledJob in interface ScheduledJobManagerpublic Date updateCronJobSchedule(ScheduledJobKey key, String newCronSchedule)
ScheduledJobManagerManagedScheduledCronJob and requires
AbstractManagedScheduledJob.isEditable() to be true.updateCronJobSchedule in interface ScheduledJobManagerpublic Date updateCronSchedule(ScheduledJobKey key, String newCronSchedule)
public Date updateSimpleJobSchedule(ScheduledJobKey key, long repeatInterval)
ScheduledJobManagerManagedScheduledSimpleJob and requires
AbstractManagedScheduledJob.isEditable() to be true.updateSimpleJobSchedule in interface ScheduledJobManagerpublic Date updateSimpleSchedule(ScheduledJobKey key, long repeatInterval)
public void runNow(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canRunAdhoc() to be true.
runNow in interface ScheduledJobManagerpublic void disable(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canDisable() to be true.
disable in interface ScheduledJobManagerpublic void disableJob(ScheduledJobKey key)
public void enable(ScheduledJobKey key)
ScheduledJobManager
Requires ManagedScheduledJob.canDisable() to be true.
enable in interface ScheduledJobManagerpublic void enableJob(ScheduledJobKey key)
public void updateEnabledJobExecutionStatus(ScheduledJobKey key, ScheduledJobStatus jobStatus)
public void updateDisabledJobExecutionStatus(ScheduledJobKey key, ScheduledJobStatus jobStatus)
public String getCronExpression(ScheduledJobKey key)
ScheduledJobManagergetCronExpression in interface ScheduledJobManagernull if not a cron job.public Long getRepeatInterval(ScheduledJobKey key)
ScheduledJobManagergetRepeatInterval in interface ScheduledJobManagernull if not a simple jobpublic static com.atlassian.scheduler.config.JobId scheduledJobKeyToJobIdWithRunNowSuffix(ScheduledJobKey scheduledJobKey)
runNow(com.atlassian.confluence.schedule.ScheduledJobKey).public static ScheduledJobKey jobIdToScheduledJobKeyWithoutRunNowSuffix(com.atlassian.scheduler.config.JobId jobId)
runNow(com.atlassian.confluence.schedule.ScheduledJobKey).Copyright © 2003–2019 Atlassian. All rights reserved.