public class CaesiumSchedulerService
extends com.atlassian.scheduler.core.AbstractSchedulerService
| Constructor and Description |
|---|
CaesiumSchedulerService(CaesiumSchedulerConfiguration config,
com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao,
ClusteredJobDao clusteredJobDao) |
CaesiumSchedulerService(CaesiumSchedulerConfiguration config,
com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao,
ClusteredJobDao clusteredJobDao,
com.atlassian.scheduler.core.util.ParameterMapSerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
Date |
calculateNextRunTime(com.atlassian.scheduler.config.Schedule schedule) |
protected static com.atlassian.scheduler.core.util.ParameterMapSerializer |
createParameterMapSerializer(CaesiumSchedulerConfiguration config)
The default factory method used for parameter map serializers.
|
protected void |
enqueueJob(com.atlassian.scheduler.config.JobId jobId,
Date expectedTime) |
protected void |
executeQueuedJob(QueuedJob job)
Callback from a queue worker to handle a
QueuedJob that is now due. |
com.atlassian.scheduler.status.JobDetails |
getJobDetails(com.atlassian.scheduler.config.JobId jobId) |
Set<com.atlassian.scheduler.config.JobRunnerKey> |
getJobRunnerKeysForAllScheduledJobs() |
List<com.atlassian.scheduler.status.JobDetails> |
getJobsByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey) |
Map<com.atlassian.scheduler.config.JobId,Date> |
getPendingJobs()
Returns the jobs that are currently in the scheduler's "to-do" list, in a map that is ordered by when they are scheduled
to run.
|
void |
refreshClusteredJob(com.atlassian.scheduler.config.JobId jobId)
Preform a one-off refresh of a cluster job that is suspected of changing state.
|
void |
refreshClusteredJobs()
Perform the routine maintenance that is necessary to guarantee that this cluster node has
up-to-date information concerning all clustered jobs.
|
void |
scheduleJob(com.atlassian.scheduler.config.JobId jobId,
com.atlassian.scheduler.config.JobConfig jobConfig) |
protected void |
shutdownImpl() |
protected void |
standbyImpl() |
protected void |
startImpl() |
void |
unscheduleJob(com.atlassian.scheduler.config.JobId jobId) |
addRunDetails, checked, getJobRunner, getLocallyRunningJobs, getParameterMapSerializer, getRegisteredJobRunnerKeys, getState, postJob, preJob, registerJobRunner, scheduleJobWithGeneratedId, shutdown, standby, start, unregisterJobRunner, waitUntilIdlepublic CaesiumSchedulerService(CaesiumSchedulerConfiguration config, com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao, ClusteredJobDao clusteredJobDao)
public CaesiumSchedulerService(CaesiumSchedulerConfiguration config, com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao, ClusteredJobDao clusteredJobDao, com.atlassian.scheduler.core.util.ParameterMapSerializer serializer)
public void scheduleJob(com.atlassian.scheduler.config.JobId jobId,
com.atlassian.scheduler.config.JobConfig jobConfig)
throws com.atlassian.scheduler.SchedulerServiceException
com.atlassian.scheduler.SchedulerServiceExceptionpublic void unscheduleJob(com.atlassian.scheduler.config.JobId jobId)
@Nullable public com.atlassian.scheduler.status.JobDetails getJobDetails(com.atlassian.scheduler.config.JobId jobId)
@Nonnull public Set<com.atlassian.scheduler.config.JobRunnerKey> getJobRunnerKeysForAllScheduledJobs()
@Nonnull public List<com.atlassian.scheduler.status.JobDetails> getJobsByJobRunnerKey(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey)
@Nullable public Date calculateNextRunTime(com.atlassian.scheduler.config.Schedule schedule) throws com.atlassian.scheduler.SchedulerServiceException
com.atlassian.scheduler.SchedulerServiceExceptionprotected void startImpl()
throws com.atlassian.scheduler.SchedulerServiceException
startImpl in class com.atlassian.scheduler.core.AbstractSchedulerServicecom.atlassian.scheduler.SchedulerServiceExceptionprotected void standbyImpl()
throws com.atlassian.scheduler.SchedulerServiceException
standbyImpl in class com.atlassian.scheduler.core.AbstractSchedulerServicecom.atlassian.scheduler.SchedulerServiceExceptionprotected void shutdownImpl()
shutdownImpl in class com.atlassian.scheduler.core.AbstractSchedulerServicepublic void refreshClusteredJob(com.atlassian.scheduler.config.JobId jobId)
This may be useful to an implementation that is using external messages to communicate changes to clustered job schedules.
jobId - the jobId of the job whose persisted state may have changedpublic void refreshClusteredJobs()
If the scheduler has already been shutdown, then this request is ignored.
protected void executeQueuedJob(QueuedJob job)
QueuedJob that is now due.job - the job to be executedprotected void enqueueJob(com.atlassian.scheduler.config.JobId jobId,
@Nullable
Date expectedTime)
@Internal public Map<com.atlassian.scheduler.config.JobId,Date> getPendingJobs()
Note that this is not part of the atlassian-scheduler API and has been provided primarily as a debugging and
instrumentation tool.
protected static com.atlassian.scheduler.core.util.ParameterMapSerializer createParameterMapSerializer(CaesiumSchedulerConfiguration config)
config - the caesium scheduler configurationCopyright © 2019 Atlassian. All rights reserved.