Class ScheduledSimpleJob
- java.lang.Object
-
- com.atlassian.confluence.schedule.AbstractScheduledJob
-
- com.atlassian.confluence.schedule.ScheduledSimpleJob
-
- All Implemented Interfaces:
ScheduledJob
public class ScheduledSimpleJob extends AbstractScheduledJob
This class is for easily setting an atlassian-scheduler interval job from Spring. ThefirstRunTimein the schedule of isJobConfigis set tonull(the job should run as soon as possible). You may need to customize it.If your job is only meaningful in clustered environment, use the constructor that can set
clusteredOnlytotrueso that your job won't be scheduled in non-clustered environments.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, boolean clusteredOnly)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs, boolean clusteredOnly)idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.atlassian.scheduler.config.JobConfigtoJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount)static com.atlassian.scheduler.config.JobConfigtoJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs)-
Methods inherited from class com.atlassian.confluence.schedule.AbstractScheduledJob
equals, getJobConfig, getJobRunner, hashCode, isClusteredOnly, toString
-
-
-
-
Constructor Detail
-
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, boolean clusteredOnly)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
ScheduledSimpleJob
public ScheduledSimpleJob(String id, com.atlassian.scheduler.JobRunner jobRunner, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs, boolean clusteredOnly)
idis used for bothJobRunnerKeyto register thejobRunnerandJobIdto schedule the job.
-
-
Method Detail
-
toJobConfig
public static com.atlassian.scheduler.config.JobConfig toJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount)
-
toJobConfig
public static com.atlassian.scheduler.config.JobConfig toJobConfig(String jobRunnerKey, boolean runOncePerCluster, long repeatInterval, int repeatCount, int jitterSecs)
-
-