RemoteMBeanScheduler (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.impl Class RemoteMBeanScheduler

java.lang.Object
  extended by org.quartz.impl.RemoteMBeanScheduler
All Implemented Interfaces:
Scheduler
Direct Known Subclasses:
JBoss4RMIRemoteMBeanScheduler

public abstract class RemoteMBeanScheduler
extends Object
implements Scheduler

An implementation of the Scheduler interface that remotely proxies all method calls to the equivalent call on a given QuartzScheduler instance, via JMX.

A user must create a subclass to implement the actual connection to the remote MBeanServer using their application specific connector. For example JBoss4RMIRemoteMBeanScheduler.

See Also:
Scheduler, QuartzScheduler, org.quartz.core.SchedulingContext

Field Summary
 
Fields inherited from interface org.quartz.Scheduler
DEFAULT_FAIL_OVER_GROUP, DEFAULT_GROUP, DEFAULT_RECOVERY_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS, FAILED_JOB_ORIGINAL_TRIGGER_GROUP, FAILED_JOB_ORIGINAL_TRIGGER_NAME
 
Constructor Summary
RemoteMBeanScheduler()
           
 
Method Summary
 void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void addJob(JobDetail jobDetail, boolean replace)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean checkExists(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean checkExists(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void clear()
          Clears (deletes!) all scheduling data - all Jobs, Triggers Calendars.
 boolean deleteCalendar(String calName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean deleteJob(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean deleteJobs(List<JobKey> jobKeys)
          Delete the identified Jobs from the Scheduler - and any associated Triggers.
protected abstract  Object getAttribute(String attribute)
          Get the given attribute of the remote Scheduler MBean.
protected abstract  AttributeList getAttributes(String[] attributes)
          Get the given attributes of the remote Scheduler MBean.
 Calendar getCalendar(String calName)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 List<String> getCalendarNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 SchedulerContext getContext()
           Returns the SchedulerContext of the Scheduler.
 List<JobExecutionContext> getCurrentlyExecutingJobs()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 JobDetail getJobDetail(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 List<String> getJobGroupNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 ListenerManager getListenerManager()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 SchedulerMetaData getMetaData()
          Get a SchedulerMetaData object describing the settings and capabilities of the scheduler instance.
 Set<String> getPausedTriggerGroups()
          Get the names of all Trigger groups that are paused.
 String getSchedulerInstanceId()
           Returns the instance Id of the Scheduler.
 String getSchedulerName()
           Returns the name of the Scheduler.
protected  ObjectName getSchedulerObjectName()
          Get the name under which the Scheduler MBean is registered on the remote MBean server.
 Trigger getTrigger(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 List<String> getTriggerGroupNames()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 List<Trigger> getTriggersOfJob(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Trigger.TriggerState getTriggerState(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
abstract  void initialize()
          Initialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.
 boolean interrupt(JobKey jobKey)
          Request the interruption, within this Scheduler instance, of all currently executing instances of the identified Job, which must be an implementor of the InterruptableJob interface.
protected abstract  Object invoke(String operationName, Object[] params, String[] signature)
          Invoke the given operation on the remote Scheduler MBean.
 boolean isInStandbyMode()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean isShutdown()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 boolean isStarted()
          Whether the scheduler has been started.
 void pauseAll()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseJob(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseJobs(GroupMatcher<JobKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseTrigger(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void pauseTriggers(GroupMatcher<TriggerKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Date rescheduleJob(TriggerKey triggerKey, Trigger newTrigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeAll()
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeJob(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeJobs(GroupMatcher<JobKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeTrigger(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void resumeTriggers(GroupMatcher<TriggerKey> matcher)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Date scheduleJob(JobDetail jobDetail, Trigger trigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 Date scheduleJob(Trigger trigger)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void scheduleJobs(Map<JobDetail,List<Trigger>> triggersAndJobs, boolean replace)
          Schedule all of the given jobs with the related set of triggers.
 void setJobFactory(org.quartz.spi.JobFactory factory)
          Set the JobFactory that will be responsible for producing instances of Job classes.
 void setSchedulerObjectName(ObjectName schedulerObjectName)
          Set the name under which the Scheduler MBean is registered on the remote MBean server.
 void setSchedulerObjectName(String schedulerObjectName)
          Set the name under which the Scheduler MBean is registered on the remote MBean server.
 void shutdown()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void shutdown(boolean waitForJobsToComplete)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void standby()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void start()
           Calls the equivalent method on the 'proxied' QuartzScheduler.
 void startDelayed(int seconds)
           Calls the equivalent method on the 'proxied' QuartzScheduler.
protected  Boolean toBoolean(boolean bool)
           
 void triggerJob(JobKey jobKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 void triggerJob(JobKey jobKey, JobDataMap data)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean unscheduleJob(TriggerKey triggerKey)
           Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.
 boolean unscheduleJobs(List<TriggerKey> triggerKeys)
          Remove all of the indicated Triggers from the scheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteMBeanScheduler

public RemoteMBeanScheduler()
Method Detail

getSchedulerObjectName

protected ObjectName getSchedulerObjectName()
Get the name under which the Scheduler MBean is registered on the remote MBean server.


setSchedulerObjectName

public void setSchedulerObjectName(String schedulerObjectName)
                            throws SchedulerException
Set the name under which the Scheduler MBean is registered on the remote MBean server.

Throws:
SchedulerException

setSchedulerObjectName

public void setSchedulerObjectName(ObjectName schedulerObjectName)
                            throws SchedulerException
Set the name under which the Scheduler MBean is registered on the remote MBean server.

Throws:
SchedulerException

initialize

public abstract void initialize()
                         throws SchedulerException
Initialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.

Throws:
SchedulerException

getAttribute

protected abstract Object getAttribute(String attribute)
                                throws SchedulerException
Get the given attribute of the remote Scheduler MBean.

Throws:
SchedulerException

getAttributes

protected abstract AttributeList getAttributes(String[] attributes)
                                        throws SchedulerException
Get the given attributes of the remote Scheduler MBean.

Throws:
SchedulerException

invoke

protected abstract Object invoke(String operationName,
                                 Object[] params,
                                 String[] signature)
                          throws SchedulerException
Invoke the given operation on the remote Scheduler MBean.

Throws:
SchedulerException

getSchedulerName

public String getSchedulerName()
                        throws SchedulerException

Returns the name of the Scheduler.

Specified by:
getSchedulerName in interface Scheduler
Throws:
SchedulerException

getSchedulerInstanceId

public String getSchedulerInstanceId()
                              throws SchedulerException

Returns the instance Id of the Scheduler.

Specified by:
getSchedulerInstanceId in interface Scheduler
Throws:
SchedulerException

getMetaData

public SchedulerMetaData getMetaData()
                              throws SchedulerException
Description copied from interface: Scheduler
Get a SchedulerMetaData object describing the settings and capabilities of the scheduler instance.

Note that the data returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the meta data values may be different.

Specified by:
getMetaData in interface Scheduler
Throws:
SchedulerException

getContext

public SchedulerContext getContext()
                            throws SchedulerException

Returns the SchedulerContext of the Scheduler.

Specified by:
getContext in interface Scheduler
Throws:
SchedulerException

start

public void start()
           throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
start in interface Scheduler
Throws:
SchedulerException - if shutdown() has been called, or there is an error within the Scheduler.
See Also:
Scheduler.startDelayed(int), Scheduler.standby(), Scheduler.shutdown()

startDelayed

public void startDelayed(int seconds)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
startDelayed in interface Scheduler
Throws:
SchedulerException - if shutdown() has been called, or there is an error within the Scheduler.
See Also:
Scheduler.start(), Scheduler.standby(), Scheduler.shutdown()

standby

public void standby()
             throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
standby in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.start(), Scheduler.pauseAll()

isStarted

public boolean isStarted()
                  throws SchedulerException
Whether the scheduler has been started.

Note: This only reflects whether start() has ever been called on this Scheduler, so it will return true even if the Scheduler is currently in standby mode or has been since shutdown.

Specified by:
isStarted in interface Scheduler
Throws:
SchedulerException
See Also:
start(), isShutdown(), isInStandbyMode()

isInStandbyMode

public boolean isInStandbyMode()
                        throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
isInStandbyMode in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.standby(), Scheduler.start()

shutdown

public void shutdown()
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
shutdown in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.shutdown(boolean)

shutdown

public void shutdown(boolean waitForJobsToComplete)
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
shutdown in interface Scheduler
Parameters:
waitForJobsToComplete - if true the scheduler will not allow this method to return until all currently executing jobs have completed.
Throws:
SchedulerException
See Also:
Scheduler.shutdown()

isShutdown

public boolean isShutdown()
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
isShutdown in interface Scheduler
Throws:
SchedulerException

getCurrentlyExecutingJobs

public List<JobExecutionContext> getCurrentlyExecutingJobs()
                                                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getCurrentlyExecutingJobs in interface Scheduler
Throws:
SchedulerException
See Also:
JobExecutionContext

scheduleJob

public Date scheduleJob(JobDetail jobDetail,
                        Trigger trigger)
                 throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
scheduleJob in interface Scheduler
Throws:
SchedulerException - if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

scheduleJob

public Date scheduleJob(Trigger trigger)
                 throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
scheduleJob in interface Scheduler
Throws:
SchedulerException - if the indicated Job does not exist, or the Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

addJob

public void addJob(JobDetail jobDetail,
                   boolean replace)
            throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
addJob in interface Scheduler
Throws:
SchedulerException - if there is an internal Scheduler error, or if the Job is not durable, or a Job with the same name already exists, and replace is false.

deleteJob

public boolean deleteJob(JobKey jobKey)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
deleteJob in interface Scheduler
Returns:
true if the Job was found and deleted.
Throws:
SchedulerException - if there is an internal Scheduler error.

unscheduleJob

public boolean unscheduleJob(TriggerKey triggerKey)
                      throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
unscheduleJob in interface Scheduler
Throws:
SchedulerException

deleteJobs

public boolean deleteJobs(List<JobKey> jobKeys)
                   throws SchedulerException
Description copied from interface: Scheduler
Delete the identified Jobs from the Scheduler - and any associated Triggers.

Note that while this bulk operation is likely more efficient than invoking deleteJob(JobKey jobKey) several times, it may have the adverse affect of holding data locks for a single long duration of time (rather than lots of small durations of time).

Specified by:
deleteJobs in interface Scheduler
Returns:
true if all of the Jobs were found and deleted, false if one or more were not deleted.
Throws:
SchedulerException - if there is an internal Scheduler error.

scheduleJobs

public void scheduleJobs(Map<JobDetail,List<Trigger>> triggersAndJobs,
                         boolean replace)
                  throws SchedulerException
Description copied from interface: Scheduler
Schedule all of the given jobs with the related set of triggers.

If any of the given jobs or triggers already exist (or more specifically, if the keys are not unique) and the replace parameter is not set to true then an exception will be thrown.

Specified by:
scheduleJobs in interface Scheduler
Throws:
ObjectAlreadyExistsException - if the job/trigger keys are not unique and the replace flag is not set to true.
SchedulerException

unscheduleJobs

public boolean unscheduleJobs(List<TriggerKey> triggerKeys)
                       throws SchedulerException
Description copied from interface: Scheduler
Remove all of the indicated Triggers from the scheduler.

If the related job does not have any other triggers, and the job is not durable, then the job will also be deleted.

Note that while this bulk operation is likely more efficient than invoking unscheduleJob(TriggerKey triggerKey) several times, it may have the adverse affect of holding data locks for a single long duration of time (rather than lots of small durations of time).

Specified by:
unscheduleJobs in interface Scheduler
Throws:
SchedulerException

rescheduleJob

public Date rescheduleJob(TriggerKey triggerKey,
                          Trigger newTrigger)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
rescheduleJob in interface Scheduler
Parameters:
triggerKey - identity of the trigger to replace
newTrigger - The new Trigger to be stored.
Returns:
null if a Trigger with the given name & group was not found and removed from the store, otherwise the first fire time of the newly scheduled trigger.
Throws:
SchedulerException

triggerJob

public void triggerJob(JobKey jobKey)
                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJob in interface Scheduler
Throws:
SchedulerException

triggerJob

public void triggerJob(JobKey jobKey,
                       JobDataMap data)
                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
triggerJob in interface Scheduler
data - the (possibly null) JobDataMap to be associated with the trigger that fires the job immediately.
Throws:
SchedulerException

pauseTrigger

public void pauseTrigger(TriggerKey triggerKey)
                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseTrigger in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeTrigger(TriggerKey)

pauseTriggers

public void pauseTriggers(GroupMatcher<TriggerKey> matcher)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseTriggers in interface Scheduler
Parameters:
matcher - The matcher to evaluate against know groups
Throws:
SchedulerException
See Also:
Scheduler.resumeTriggers(org.quartz.impl.matchers.GroupMatcher)

pauseJob

public void pauseJob(JobKey jobKey)
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseJob in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeJob(JobKey)

pauseJobs

public void pauseJobs(GroupMatcher<JobKey> matcher)
               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseJobs in interface Scheduler
Parameters:
matcher - The matcher to evaluate against know groups
Throws:
SchedulerException - On error
See Also:
Scheduler.resumeJobs(org.quartz.impl.matchers.GroupMatcher)

resumeTrigger

public void resumeTrigger(TriggerKey triggerKey)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeTrigger in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseTrigger(TriggerKey)

resumeTriggers

public void resumeTriggers(GroupMatcher<TriggerKey> matcher)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeTriggers in interface Scheduler
Parameters:
matcher - The matcher to evaluate against know paused groups
Throws:
SchedulerException - On error
See Also:
Scheduler.pauseTriggers(org.quartz.impl.matchers.GroupMatcher)

resumeJob

public void resumeJob(JobKey jobKey)
               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeJob in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseJob(JobKey)

resumeJobs

public void resumeJobs(GroupMatcher<JobKey> matcher)
                throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeJobs in interface Scheduler
Parameters:
matcher - The matcher to evaluate against known paused groups
Throws:
SchedulerException - On error
See Also:
Scheduler.pauseJobs(GroupMatcher)

pauseAll

public void pauseAll()
              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
pauseAll in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.resumeAll(), Scheduler.pauseTriggers(org.quartz.impl.matchers.GroupMatcher), Scheduler.standby()

resumeAll

public void resumeAll()
               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
resumeAll in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.pauseAll()

getJobGroupNames

public List<String> getJobGroupNames()
                              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobGroupNames in interface Scheduler
Throws:
SchedulerException

getJobKeys

public Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobKeys in interface Scheduler
Parameters:
matcher - Matcher to evaluate against known groups
Returns:
Set of all keys matching
Throws:
SchedulerException - On error

getTriggersOfJob

public List<Trigger> getTriggersOfJob(JobKey jobKey)
                               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggersOfJob in interface Scheduler
Throws:
SchedulerException

getTriggerGroupNames

public List<String> getTriggerGroupNames()
                                  throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerGroupNames in interface Scheduler
Throws:
SchedulerException

getTriggerKeys

public Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher)
                               throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerKeys in interface Scheduler
Parameters:
matcher - Matcher to evaluate against known groups
Returns:
List of all keys matching
Throws:
SchedulerException - On error

getJobDetail

public JobDetail getJobDetail(JobKey jobKey)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getJobDetail in interface Scheduler
Throws:
SchedulerException

getTrigger

public Trigger getTrigger(TriggerKey triggerKey)
                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getTrigger in interface Scheduler
Throws:
SchedulerException

checkExists

public boolean checkExists(JobKey jobKey)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
checkExists in interface Scheduler
Parameters:
jobKey - the identifier to check for
Returns:
true if a Job exists with the given identifier
Throws:
SchedulerException

checkExists

public boolean checkExists(TriggerKey triggerKey)
                    throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
checkExists in interface Scheduler
Parameters:
triggerKey - the identifier to check for
Returns:
true if a Trigger exists with the given identifier
Throws:
SchedulerException

clear

public void clear()
           throws SchedulerException
Description copied from interface: Scheduler
Clears (deletes!) all scheduling data - all Jobs, Triggers Calendars.

Specified by:
clear in interface Scheduler
Throws:
SchedulerException

getTriggerState

public Trigger.TriggerState getTriggerState(TriggerKey triggerKey)
                                     throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getTriggerState in interface Scheduler
Throws:
SchedulerException
See Also:
Trigger.TriggerState

addCalendar

public void addCalendar(String calName,
                        Calendar calendar,
                        boolean replace,
                        boolean updateTriggers)
                 throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
addCalendar in interface Scheduler
updateTriggers - whether or not to update existing triggers that referenced the already existing calendar so that they are 'correct' based on the new trigger.
Throws:
SchedulerException - if there is an internal Scheduler error, or a Calendar with the same name already exists, and replace is false.

deleteCalendar

public boolean deleteCalendar(String calName)
                       throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
deleteCalendar in interface Scheduler
Returns:
true if the Calendar was found and deleted.
Throws:
SchedulerException - if there is an internal Scheduler error.

getCalendar

public Calendar getCalendar(String calName)
                     throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getCalendar in interface Scheduler
Throws:
SchedulerException

getCalendarNames

public List<String> getCalendarNames()
                              throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler, passing the SchedulingContext associated with this instance.

Specified by:
getCalendarNames in interface Scheduler
Throws:
SchedulerException

getPausedTriggerGroups

public Set<String> getPausedTriggerGroups()
                                   throws SchedulerException
Description copied from interface: Scheduler
Get the names of all Trigger groups that are paused.

Specified by:
getPausedTriggerGroups in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.getPausedTriggerGroups()

getListenerManager

public ListenerManager getListenerManager()
                                   throws SchedulerException

Calls the equivalent method on the 'proxied' QuartzScheduler.

Specified by:
getListenerManager in interface Scheduler
Returns:
the scheduler's ListenerManager
Throws:
SchedulerException - if the scheduler is not local
See Also:
ListenerManager, JobListener, TriggerListener, SchedulerListener

interrupt

public boolean interrupt(JobKey jobKey)
                  throws UnableToInterruptJobException
Description copied from interface: Scheduler
Request the interruption, within this Scheduler instance, of all currently executing instances of the identified Job, which must be an implementor of the InterruptableJob interface.

If more than one instance of the identified job is currently executing, the InterruptableJob#interrupt() method will be called on each instance. However, there is a limitation that in the case that interrupt() on one instances throws an exception, all remaining instances (that have not yet been interrupted) will not have their interrupt() method called.

If you wish to interrupt a specific instance of a job (when more than one is executing) you can do so by calling Scheduler.getCurrentlyExecutingJobs() to obtain a handle to the job instance, and then invoke interrupt() on it yourself.

This method is not cluster aware. That is, it will only interrupt instances of the identified InterruptableJob currently executing in this Scheduler instance, not across the entire cluster.

Specified by:
interrupt in interface Scheduler
Returns:
true is at least one instance of the identified job was found and interrupted.
Throws:
UnableToInterruptJobException - if the job does not implement InterruptableJob, or there is an exception while interrupting the job.
See Also:
Scheduler.interrupt(JobKey)

setJobFactory

public void setJobFactory(org.quartz.spi.JobFactory factory)
                   throws SchedulerException
Description copied from interface: Scheduler
Set the JobFactory that will be responsible for producing instances of Job classes.

JobFactories may be of use to those wishing to have their application produce Job instances via some special mechanism, such as to give the opportunity for dependency injection.

Specified by:
setJobFactory in interface Scheduler
Throws:
SchedulerException
See Also:
Scheduler.setJobFactory(org.quartz.spi.JobFactory)

toBoolean

protected Boolean toBoolean(boolean bool)


Copyright 2001-2011, Terracotta, Inc.