public class TimerPluginScheduler extends Object implements PluginScheduler, org.springframework.beans.factory.DisposableBean
| Modifier | Constructor and Description |
|---|---|
|
TimerPluginScheduler() |
protected |
TimerPluginScheduler(Map<String,Timer> tasks,
boolean useDaemons) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
scheduleJob(String name,
Class<? extends PluginJob> job,
Map<String,Object> jobDataMap,
Date startTime,
long repeatInterval)
Schedule the given job.
|
void |
unscheduleJob(String name)
Unschedule the given job.
|
public void scheduleJob(String name, Class<? extends PluginJob> job, Map<String,Object> jobDataMap, Date startTime, long repeatInterval)
PluginScheduler WARNING: it is very important not to try to call this method until the underlying application
is fully started. You should implement LifecycleAware and call scheduleJob()
only on LifecycleAware.onStart()
scheduleJob in interface PluginSchedulername - A unique key of the jobjob - The class for the jobjobDataMap - Any data that needs to be passed to the job. This map instance will always be the same
instance that is given to the job when it executes.startTime - The time the job is to start.repeatInterval - How long the interval between repeats, in milliseconds. Note, some implementationspublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void unscheduleJob(String name)
PluginSchedulerunscheduleJob in interface PluginSchedulername - The job key to unscheduleCopyright © 2019 Atlassian. All rights reserved.