org.rhq.enterprise.server.scheduler
Interface EnhancedScheduler

All Superinterfaces:
org.quartz.Scheduler
All Known Subinterfaces:
SchedulerLocal
All Known Implementing Classes:
EnhancedSchedulerImpl, SchedulerBean

public interface EnhancedScheduler
extends org.quartz.Scheduler

An enhanced scheduler interface that provides the normal scheduler API with some additional convenience methods.

Author:
John Mazzitelli

Field Summary
 
Fields inherited from interface org.quartz.Scheduler
DEFAULT_FAIL_OVER_GROUP, DEFAULT_GROUP, DEFAULT_MANUAL_TRIGGERS, DEFAULT_RECOVERY_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS, FAILED_JOB_ORIGINAL_TRIGGER_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_NAME
 
Method Summary
 void scheduleCronJob(String name, String groupName, org.quartz.JobDataMap jobData, Class<? extends org.quartz.Job> jobClass, boolean rescheduleIfExists, boolean isVolatile, String cronString)
          Schedules the job such that it triggers according to the given cron schedule.
 void scheduleRepeatingJob(String name, String groupName, org.quartz.JobDataMap jobData, Class<? extends org.quartz.Job> jobClass, boolean rescheduleIfExists, boolean isVolatile, long initialDelay, long interval)
          Schedules the job such that it triggers immediately (following the initial delay time) and then repeats every interval seconds.
 void scheduleSimpleCronJob(Class<? extends org.quartz.Job> jobClass, boolean rescheduleIfExists, boolean isVolatile, String cronString)
          Schedules the job such that it triggers according to the given cron schedule.
 void scheduleSimpleRepeatingJob(Class<? extends org.quartz.Job> jobClass, boolean rescheduleIfExists, boolean isVolatile, long initialDelay, long interval)
          Schedules the job such that it triggers immediately (following the initial delay time) and then repeats every interval seconds.
 
Methods inherited from interface org.quartz.Scheduler
addCalendar, addGlobalJobListener, addGlobalTriggerListener, addJob, addJobListener, addSchedulerListener, addTriggerListener, deleteCalendar, deleteJob, getCalendar, getCalendarNames, getContext, getCurrentlyExecutingJobs, getGlobalJobListener, getGlobalJobListeners, getGlobalTriggerListener, getGlobalTriggerListeners, getJobDetail, getJobGroupNames, getJobListener, getJobListenerNames, getJobNames, getMetaData, getPausedTriggerGroups, getSchedulerInstanceId, getSchedulerListeners, getSchedulerName, getTrigger, getTriggerGroupNames, getTriggerListener, getTriggerListenerNames, getTriggerNames, getTriggersOfJob, getTriggerState, interrupt, isInStandbyMode, isPaused, isShutdown, isStarted, pause, pauseAll, pauseJob, pauseJobGroup, pauseTrigger, pauseTriggerGroup, removeGlobalJobListener, removeGlobalJobListener, removeGlobalTriggerListener, removeGlobalTriggerListener, removeJobListener, removeSchedulerListener, removeTriggerListener, rescheduleJob, resumeAll, resumeJob, resumeJobGroup, resumeTrigger, resumeTriggerGroup, scheduleJob, scheduleJob, setJobFactory, shutdown, shutdown, standby, start, startDelayed, triggerJob, triggerJob, triggerJobWithVolatileTrigger, triggerJobWithVolatileTrigger, unscheduleJob
 

Method Detail

scheduleRepeatingJob

void scheduleRepeatingJob(String name,
                          String groupName,
                          org.quartz.JobDataMap jobData,
                          Class<? extends org.quartz.Job> jobClass,
                          boolean rescheduleIfExists,
                          boolean isVolatile,
                          long initialDelay,
                          long interval)
                          throws org.quartz.SchedulerException
Schedules the job such that it triggers immediately (following the initial delay time) and then repeats every interval seconds.

This is a convienence method to schedule jobs that need to run periodically. It schedules jobs with the given groupName and name and a given set of job data to be passed to the job when it is executed. The schedule repeats without end.

The schedule will may or may not be isVolatile - that is, if it is not volatile, it will be persisted and rescheduled when the JON Server starts back up again.

If this method is called again with the same groupName and name and rescheduleIfExists is false, this method will not schedule it again - it will leave the old schedule. If you want to remove the old schedule, pass in true for rescheduleIfExists or use SchedulerServiceMBean.deleteJob(String, String).

Parameters:
name - the name of the job to be scheduled. This is also the group name.
groupName - if you want to group jobs together, give them the same group name; otherwise, can be the same as name
rescheduleIfExists - if true, and the job is already scheduled, this new schedule will replace it. if false, any existing job will remain and this method simply does nothing and returns immediately
jobData - a map of serializable data to be passed to the job each time the job is executed
jobClass - the class of the job that will be executed when the trigger fires
isVolatile - if false, the job will be persisted to the database; if true, when the scheduler is shutdown, the job's schedule is lost
initialDelay - number of milliseconds to wait before triggering the job for the first time
interval - number of milliseconds between each triggering of the job
Throws:
org.quartz.SchedulerException
See Also:
SchedulerServiceMBean.scheduleJob(org.quartz.JobDetail, org.quartz.Trigger)

scheduleCronJob

void scheduleCronJob(String name,
                     String groupName,
                     org.quartz.JobDataMap jobData,
                     Class<? extends org.quartz.Job> jobClass,
                     boolean rescheduleIfExists,
                     boolean isVolatile,
                     String cronString)
                     throws org.quartz.SchedulerException
Schedules the job such that it triggers according to the given cron schedule.

This is a convienence method to schedule jobs that need to run periodically. It schedules jobs with the given groupName and name and a given set of job data to be passed to the job when it is executed. The schedule repeats without end.

The schedule will may or may not be isVolatile - that is, if it is not volatile, it will be persisted and rescheduled when the JON Server starts back up again.

If this method is called again with the same groupName and name and rescheduleIfExists is false, this method will not schedule it again - it will leave the old schedule. If you want to remove the old schedule, pass in true for rescheduleIfExists or use SchedulerServiceMBean.deleteJob(String, String).

Parameters:
name - the name of the job to be scheduled. This is also the group name.
groupName - if you want to group jobs together, give them the same group name; otherwise, can be the same as name
rescheduleIfExists - if true, and the job is already scheduled, this new schedule will replace it. if false, any existing job will remain and this method simply does nothing and returns immediately
jobData - a map of serializable data to be passed to the job each time the job is executed
jobClass - the class of the job that will be executed when the trigger fires
isVolatile - if false, the job will be persisted to the database; if true, when the scheduler is shutdown, the job's schedule is lost
cronString - the actual schedule for when the job is triggered. See the Quartz documentation on valid cron syntax.
Throws:
org.quartz.SchedulerException
See Also:
SchedulerServiceMBean.scheduleJob(org.quartz.JobDetail, org.quartz.Trigger)

scheduleSimpleRepeatingJob

void scheduleSimpleRepeatingJob(Class<? extends org.quartz.Job> jobClass,
                                boolean rescheduleIfExists,
                                boolean isVolatile,
                                long initialDelay,
                                long interval)
                                throws org.quartz.SchedulerException
Schedules the job such that it triggers immediately (following the initial delay time) and then repeats every interval seconds.

This is a convienence method to schedule simple jobs that need to run periodically. It schedules simple jobs - there is no JobDataMap associated with the job and the schedule repeats without end.

This method delegates to scheduleRepeatingJob(String, String, JobDataMap, Class, boolean, boolean, long, long) where the name is the name of the given class (jobClass.getName()) and null is passed in as the job data map.

Parameters:
jobClass - the class of the job that will be executed when the trigger fires
rescheduleIfExists - if true, and the job is already scheduled, this new schedule will replace it. if false, any existing job will remain and this method simply does nothing and returns immediately
isVolatile - if false, the job will be persisted to the database; if true, when the scheduler is shutdown, the job's schedule is lost
initialDelay - number of milliseconds to wait before triggering the job for the first time
interval - number of milliseconds between each triggering of the job
Throws:
org.quartz.SchedulerException
See Also:
SchedulerServiceMBean.scheduleJob(org.quartz.JobDetail, org.quartz.Trigger)

scheduleSimpleCronJob

void scheduleSimpleCronJob(Class<? extends org.quartz.Job> jobClass,
                           boolean rescheduleIfExists,
                           boolean isVolatile,
                           String cronString)
                           throws org.quartz.SchedulerException
Schedules the job such that it triggers according to the given cron schedule.

This is a convienence method to schedule simple cron jobs that need to run periodically. It schedules simple jobs - there is no JobDataMap associated with the job and the schedule repeats without end.

This method delegates to scheduleCronJob(String, String, JobDataMap, Class, boolean, boolean, String) where the name is the name of the given class (jobClass.getName()) and null is passed in as the job data map.

Parameters:
jobClass - the class of the job that will be executed when the trigger fires
rescheduleIfExists - if true, and the job is already scheduled, this new schedule will replace it. if false, any existing job will remain and this method simply does nothing and returns immediately
isVolatile - if false, the job will be persisted to the database; if true, when the scheduler is shutdown, the job's schedule is lost
cronString - the actual schedule for when the job is triggered. See the Quartz documentation on valid cron syntax.
Throws:
org.quartz.SchedulerException
See Also:
SchedulerServiceMBean.scheduleJob(org.quartz.JobDetail, org.quartz.Trigger)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.