@ParametersAreNonnullByDefault public class ConfluenceSchedulerService extends com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService
CaesiumSchedulerService
, this adds a few features:
(1) stops job after a number of repeats (intended for interval jobs),
(2) schedule jittering (intended cron jobs in OnDemand environment),
(3) job execution listener,
(4) ThreadLocalCache
is initialized before a job is run and disposed after that
(1) and (2) cannot be used at the same time. Use methods in ScheduleUtil
to set relevant info to JobRunner parameters.
Note about parameters of clustered jobs: Parameters of clustered jobs are serialized and deserialized (at other nodes). For security reason, their class names are checked (exact matching) against a white list. Null keys and values are not allowed. Parameters of local jobs don't have this restriction.
Constructor and Description |
---|
ConfluenceSchedulerService(com.atlassian.scheduler.caesium.spi.CaesiumSchedulerConfiguration config,
com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao,
com.atlassian.scheduler.caesium.spi.ClusteredJobDao clusteredJobDao,
Set<String> parameterClassWhiteList,
VCacheRequestContextOperations vCacheRequestContextOperations,
org.quartz.Scheduler scheduler,
com.atlassian.beehive.ClusterLockService lockService,
ClusterManager clusterManager) |
ConfluenceSchedulerService(com.atlassian.scheduler.caesium.spi.CaesiumSchedulerConfiguration config,
com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao,
com.atlassian.scheduler.caesium.spi.ClusteredJobDao clusteredJobDao,
Set<String> parameterClassWhiteList,
VCacheRequestContextOperations vCacheRequestContextOperations,
org.quartz.Scheduler scheduler,
com.atlassian.beehive.ClusterLockService lockService,
ClusterManager clusterManager,
com.google.common.base.Supplier<JobListener> listener) |
Modifier and Type | Method and Description |
---|---|
protected void |
enqueueJob(com.atlassian.scheduler.config.JobId jobId,
Date nextRunTime) |
void |
registerJobRunner(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey,
com.atlassian.scheduler.JobRunner jobRunner) |
void |
scheduleJob(com.atlassian.scheduler.config.JobId jobId,
com.atlassian.scheduler.config.JobConfig jobConfig) |
com.atlassian.scheduler.config.JobId |
scheduleJobWithGeneratedId(com.atlassian.scheduler.config.JobConfig jobConfig) |
calculateNextRunTime, createParameterMapSerializer, getJobDetails, getJobRunnerKeysForAllScheduledJobs, getJobsByJobRunnerKey, getPendingJobs, refreshClusteredJob, refreshClusteredJobs, shutdownImpl, standbyImpl, startImpl, unscheduleJob
public ConfluenceSchedulerService(com.atlassian.scheduler.caesium.spi.CaesiumSchedulerConfiguration config, com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao, com.atlassian.scheduler.caesium.spi.ClusteredJobDao clusteredJobDao, Set<String> parameterClassWhiteList, VCacheRequestContextOperations vCacheRequestContextOperations, org.quartz.Scheduler scheduler, com.atlassian.beehive.ClusterLockService lockService, ClusterManager clusterManager, @Nullable com.google.common.base.Supplier<JobListener> listener)
parameterClassWhiteList
- Names of classes that don't require special
class loader, e.g. plugin class loaderpublic ConfluenceSchedulerService(com.atlassian.scheduler.caesium.spi.CaesiumSchedulerConfiguration config, com.atlassian.scheduler.core.spi.RunDetailsDao runDetailsDao, com.atlassian.scheduler.caesium.spi.ClusteredJobDao clusteredJobDao, Set<String> parameterClassWhiteList, VCacheRequestContextOperations vCacheRequestContextOperations, org.quartz.Scheduler scheduler, com.atlassian.beehive.ClusterLockService lockService, ClusterManager clusterManager)
parameterClassWhiteList
- Names of classes that don't require special
class loader, e.g. plugin class loaderpublic void registerJobRunner(com.atlassian.scheduler.config.JobRunnerKey jobRunnerKey, com.atlassian.scheduler.JobRunner jobRunner)
registerJobRunner
in interface com.atlassian.scheduler.SchedulerService
registerJobRunner
in class com.atlassian.scheduler.core.AbstractSchedulerService
protected void enqueueJob(com.atlassian.scheduler.config.JobId jobId, @Nullable Date nextRunTime)
enqueueJob
in class com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService
public void scheduleJob(com.atlassian.scheduler.config.JobId jobId, com.atlassian.scheduler.config.JobConfig jobConfig) throws com.atlassian.scheduler.SchedulerServiceException
scheduleJob
in interface com.atlassian.scheduler.SchedulerService
scheduleJob
in class com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService
com.atlassian.scheduler.SchedulerServiceException
@Nonnull public com.atlassian.scheduler.config.JobId scheduleJobWithGeneratedId(com.atlassian.scheduler.config.JobConfig jobConfig) throws com.atlassian.scheduler.SchedulerServiceException
scheduleJobWithGeneratedId
in interface com.atlassian.scheduler.SchedulerService
scheduleJobWithGeneratedId
in class com.atlassian.scheduler.core.AbstractSchedulerService
com.atlassian.scheduler.SchedulerServiceException
Copyright © 2003–2016 Atlassian. All rights reserved.