|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.scheduler.core.AbstractSchedulerService
com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService
public class CaesiumSchedulerService
Simple direct implementation of a scheduler service
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.scheduler.core.LifecycleAwareSchedulerService |
---|
com.atlassian.scheduler.core.LifecycleAwareSchedulerService.State |
Field Summary |
---|
Fields inherited from class com.atlassian.scheduler.core.AbstractSchedulerService |
---|
BY_JOB_ID |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.atlassian.scheduler.core.AbstractSchedulerService |
---|
addRunDetails, checked, getJobRunner, getLocallyRunningJobs, getParameterMapSerializer, getRegisteredJobRunnerKeys, getState, postJob, preJob, registerJobRunner, scheduleJobWithGeneratedId, shutdown, standby, start, unregisterJobRunner, waitUntilIdle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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)
Method Detail |
---|
public void scheduleJob(com.atlassian.scheduler.config.JobId jobId, com.atlassian.scheduler.config.JobConfig jobConfig) throws com.atlassian.scheduler.SchedulerServiceException
com.atlassian.scheduler.SchedulerServiceException
public 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.SchedulerServiceException
protected void startImpl() throws com.atlassian.scheduler.SchedulerServiceException
startImpl
in class com.atlassian.scheduler.core.AbstractSchedulerService
com.atlassian.scheduler.SchedulerServiceException
protected void standbyImpl() throws com.atlassian.scheduler.SchedulerServiceException
standbyImpl
in class com.atlassian.scheduler.core.AbstractSchedulerService
com.atlassian.scheduler.SchedulerServiceException
protected void shutdownImpl()
shutdownImpl
in class com.atlassian.scheduler.core.AbstractSchedulerService
public 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.
CaesiumSchedulerConfiguration.refreshClusteredJobsIntervalInMinutes()
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 configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |