public abstract class TurbineScheduler extends Object
ScheduleService
Constructor and Description |
---|
TurbineScheduler() |
Modifier and Type | Method and Description |
---|---|
static void |
addJob(JobEntry je)
Add a new job to the queue.
|
static JobEntry |
getJob(int oid)
Get a specific Job from Storage.
|
static boolean |
isEnabled()
Determines if the scheduler service is currently active.
|
static List<? extends JobEntry> |
listJobs()
List jobs in the queue.
|
static JobEntry |
newJob(int sec,
int min,
int hour,
int wd,
int day_mo,
String task)
Factory method for a new Job
Schedule a job to run on a certain point of time.
|
static void |
removeJob(JobEntry je)
Remove a job from the queue.
|
static void |
startScheduler()
Starts the scheduler if not already running.
|
static void |
stopScheduler()
Stops the scheduler if ti is currently running.
|
static void |
updateJob(JobEntry je)
Add or update a job
|
public TurbineScheduler()
public static JobEntry newJob(int sec, int min, int hour, int wd, int day_mo, String task) throws TurbineException
sec
- Value for entry "seconds".min
- Value for entry "minutes".hour
- Value for entry "hours".wd
- Value for entry "week days".day_mo
- Value for entry "month days".task
- Task to execute.TurbineException
- could not create jobpublic static JobEntry getJob(int oid) throws TurbineException
oid
- The int id for the job.TurbineException
- job could not be retrievedpublic static void addJob(JobEntry je) throws TurbineException
je
- A JobEntry with the job to add.TurbineException
- job could not be addedpublic static void updateJob(JobEntry je) throws TurbineException
je
- A JobEntry with the job to modifyTurbineException
- job could not be updatedpublic static void removeJob(JobEntry je) throws TurbineException
je
- A JobEntry with the job to remove.TurbineException
- job could not be removedpublic static List<? extends JobEntry> listJobs()
public static boolean isEnabled()
public static void startScheduler()
public static void stopScheduler()
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.