| |
|
| java.lang.Object org.apache.jetspeed.scheduler.AbstractScheduler org.apache.jetspeed.scheduler.MemoryBasedScheduler
MemoryBasedScheduler | public class MemoryBasedScheduler extends AbstractScheduler implements Scheduler(Code) | | Service for a cron like scheduler that uses the
properties file instead of the database.
The methods that operate on jobs ( get,add,update,remove )
only operate on the queue in memory and changes are not reflected
to the properties file which was used to initilize the jobs.
An example is given below. The job names are the class names that
extend ScheduledJob.
services.SchedulerService.scheduler.jobs=scheduledJobName,scheduledJobName2
services.SchedulerService.scheduler.job.scheduledJobName.ID=1
services.SchedulerService.scheduler.job.scheduledJobName.SECOND=-1
services.SchedulerService.scheduler.job.scheduledJobName.MINUTE=-1
services.SchedulerService.scheduler.job.scheduledJobName.HOUR=7
services.SchedulerService.scheduler.job.scheduledJobName.WEEKDAY=-1
services.SchedulerService.scheduler.job.scheduledJobName.DAY_OF_MONTH=-1
services.SchedulerService.scheduler.job.scheduledJobName2.ID=1
services.SchedulerService.scheduler.job.scheduledJobName2.SECOND=-1
services.SchedulerService.scheduler.job.scheduledJobName2.MINUTE=-1
services.SchedulerService.scheduler.job.scheduledJobName2.HOUR=7
services.SchedulerService.scheduler.job.scheduledJobName2.WEEKDAY=-1
services.SchedulerService.scheduler.job.scheduledJobName2.DAY_OF_MONTH=-1
Based on TamboraSchedulerService written by John Thorhauer.
author: Jeff Brekke author: John Thorhauer author: David Sean Taylor version: $Id: MemoryBasedScheduler.java 516448 2007-03-09 16:25:47Z ate $ |
MemoryBasedScheduler | public MemoryBasedScheduler(Configuration config) throws Exception(Code) | | Constructor.
exception: Exception - , a generic exception. |
addJob | public void addJob(JobEntry je) throws Exception(Code) | | Add a new job to the queue.
Parameters: je - A JobEntry with the job to add. exception: Exception - , a generic exception. |
getJob | public JobEntry getJob(int oid) throws Exception(Code) | | This method returns the job element from the internal queue.
Parameters: oid - The int id for the job. A JobEntry. exception: Exception - , a generic exception. |
removeJob | public void removeJob(JobEntry je) throws Exception(Code) | | Remove a job from the queue.
Parameters: je - A JobEntry with the job to remove. exception: Exception - , a generic exception. |
start | public void start()(Code) | | |
updateJob | public void updateJob(JobEntry je) throws Exception(Code) | | Modify a Job.
Parameters: je - A JobEntry with the job to modify exception: Exception - , a generic exception. |
|
|
|