public class QuartzSchedulerService extends TurbineBaseService implements ScheduleService
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabled
Current status of the scheduler
|
protected static org.apache.commons.logging.Log |
log
Logging
|
configuration, name, serviceBrokerinitableBroker, isInitializedINTIALLY_ACTIVE, LOGGER_NAME, SERVICE_NAME| Constructor and Description |
|---|
QuartzSchedulerService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addJob(JobEntry je)
Add a new job to the queue.
|
JobEntry |
getJob(int oid)
Get a specific Job from Storage.
|
void |
init()
Initializes the SchedulerService.
|
boolean |
isEnabled()
Determines if the scheduler service is currently enabled.
|
List<? extends JobEntry> |
listJobs()
List jobs in the queue.
|
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.
|
void |
removeJob(JobEntry je)
Remove a job from the queue.
|
void |
restart()
Start (or restart) a thread to process commands, or wake up an
existing thread if one is already running.
|
protected void |
setEnabled(boolean enabled)
Sets the enabled status of the scheduler
|
void |
shutdown()
Shutdowns the service.
|
void |
startScheduler()
Starts or restarts the scheduler if not already running.
|
void |
stopScheduler()
Stops the scheduler if it is currently running.
|
void |
updateJob(JobEntry je)
Add or update a job.
|
init, initgetConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBrokergetInit, getInitableBroker, setInit, setInitableBrokerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getName, getProperties, setName, setServiceBrokergetInit, init, setInitableBrokerprotected static org.apache.commons.logging.Log log
protected boolean enabled
public QuartzSchedulerService()
public void init() throws InitializationException
init in interface Initableinit in class TurbineBaseServiceInitializationException - Something went wrong in the init
stagepublic void shutdown()
shutdown in interface Initableshutdown in class TurbineBaseServicepublic JobEntry newJob(int sec, int min, int hour, int wd, int day_mo, String task) throws TurbineException
ScheduleServicenewJob in interface ScheduleServicesec - 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 jobScheduleService.newJob(int, int, int, int, int, java.lang.String)public JobEntry getJob(int oid) throws TurbineException
getJob in interface ScheduleServiceoid - The int id for the job.TurbineException - job could not be retrieved.public void addJob(JobEntry je) throws TurbineException
addJob in interface ScheduleServiceje - A JobEntry with the job to add.TurbineException - job could not be addedpublic void removeJob(JobEntry je) throws TurbineException
removeJob in interface ScheduleServiceje - A JobEntry with the job to remove.TurbineException - job could not be removedpublic void updateJob(JobEntry je) throws TurbineException
updateJob in interface ScheduleServiceje - A JobEntry with the job to modifyTurbineException - job could not be updatedpublic List<? extends JobEntry> listJobs()
listJobs in interface ScheduleServiceprotected void setEnabled(boolean enabled)
enabled - public boolean isEnabled()
isEnabled in interface ScheduleServicepublic void startScheduler()
startScheduler in interface ScheduleServicepublic void stopScheduler()
stopScheduler in interface ScheduleServicepublic void restart()
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.