Class RemoteMBeanScheduler
- java.lang.Object
-
- org.quartz.impl.RemoteMBeanScheduler
-
- All Implemented Interfaces:
Scheduler
- Direct Known Subclasses:
JBoss4RMIRemoteMBeanScheduler
public abstract class RemoteMBeanScheduler extends java.lang.Object implements Scheduler
An implementation of the
Schedulerinterface that remotely proxies all method calls to the equivalent call on a givenQuartzSchedulerinstance, via JMX.A user must create a subclass to implement the actual connection to the remote MBeanServer using their application specific connector.
- See Also:
Scheduler,QuartzScheduler
-
-
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, FAILED_JOB_ORIGINAL_TRIGGER_SCHEDULED_FIRETIME_IN_MILLISECONDS
-
-
Constructor Summary
Constructors Constructor Description RemoteMBeanScheduler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddCalendar(java.lang.String calName, Calendar calendar, boolean replace, boolean updateTriggers)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidaddJob(JobDetail jobDetail, boolean replace)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidaddJob(JobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.booleancheckExists(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler.booleancheckExists(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler.voidclear()booleandeleteCalendar(java.lang.String calName)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.booleandeleteJob(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.booleandeleteJobs(java.util.List<JobKey> jobKeys)Delete the identifiedJobs from the Scheduler - and any associatedTriggers.protected abstract java.lang.ObjectgetAttribute(java.lang.String attribute)Get the given attribute of the remote Scheduler MBean.protected abstract javax.management.AttributeListgetAttributes(java.lang.String[] attributes)Get the given attributes of the remote Scheduler MBean.CalendargetCalendar(java.lang.String calName)Calls th0e equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.List<java.lang.String>getCalendarNames()Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.SchedulerContextgetContext()Returns theSchedulerContextof theScheduler.java.util.List<JobExecutionContext>getCurrentlyExecutingJobs()Calls the equivalent method on the 'proxied'QuartzScheduler.JobDetailgetJobDetail(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.List<java.lang.String>getJobGroupNames()Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.Set<JobKey>getJobKeys(GroupMatcher<JobKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.ListenerManagergetListenerManager()Calls the equivalent method on the 'proxied'QuartzScheduler.SchedulerMetaDatagetMetaData()Get aSchedulerMetaDataobject describing the settings and capabilities of the scheduler instance.java.util.Set<java.lang.String>getPausedTriggerGroups()Get the names of allgroups that are paused.Triggerjava.lang.StringgetSchedulerInstanceId()Returns the instance Id of theScheduler.java.lang.StringgetSchedulerName()Returns the name of theScheduler.protected javax.management.ObjectNamegetSchedulerObjectName()Get the name under which the Scheduler MBean is registered on the remote MBean server.TriggergetTrigger(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler.java.util.List<java.lang.String>getTriggerGroupNames()Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.Set<TriggerKey>getTriggerKeys(GroupMatcher<TriggerKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.List<Trigger>getTriggersOfJob(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.Trigger.TriggerStategetTriggerState(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.abstract voidinitialize()Initialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.booleaninterrupt(java.lang.String fireInstanceId)Request the interruption, within this Scheduler instance, of the identified executingJobinstance, which must be an implementor of theInterruptableJobinterface.booleaninterrupt(JobKey jobKey)Request the interruption, within this Scheduler instance, of all currently executing instances of the identifiedJob, which must be an implementor of theInterruptableJobinterface.protected abstract java.lang.Objectinvoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)Invoke the given operation on the remote Scheduler MBean.booleanisInStandbyMode()Calls the equivalent method on the 'proxied'QuartzScheduler.booleanisShutdown()Calls the equivalent method on the 'proxied'QuartzScheduler.booleanisStarted()Whether the scheduler has been started.voidpauseAll()Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidpauseJob(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidpauseJobs(GroupMatcher<JobKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidpauseTrigger(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidpauseTriggers(GroupMatcher<TriggerKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.DaterescheduleJob(TriggerKey triggerKey, Trigger newTrigger)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresetTriggerFromErrorState(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresumeAll()Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresumeJob(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresumeJobs(GroupMatcher<JobKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresumeTrigger(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidresumeTriggers(GroupMatcher<TriggerKey> matcher)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidscheduleJob(JobDetail jobDetail, java.util.Set<? extends Trigger> triggersForJob, boolean replace)Schedule the given job with the related set of triggers.java.util.DatescheduleJob(JobDetail jobDetail, Trigger trigger)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.java.util.DatescheduleJob(Trigger trigger)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidscheduleJobs(java.util.Map<JobDetail,java.util.Set<? extends Trigger>> triggersAndJobs, boolean replace)Schedule all of the given jobs with the related set of triggers.voidsetJobFactory(JobFactory factory)Set theJobFactorythat will be responsible for producing instances ofJobclasses.voidsetSchedulerObjectName(java.lang.String schedulerObjectName)Set the name under which the Scheduler MBean is registered on the remote MBean server.voidsetSchedulerObjectName(javax.management.ObjectName schedulerObjectName)Set the name under which the Scheduler MBean is registered on the remote MBean server.voidshutdown()Calls the equivalent method on the 'proxied'QuartzScheduler.voidshutdown(boolean waitForJobsToComplete)Calls the equivalent method on the 'proxied'QuartzScheduler.voidstandby()Calls the equivalent method on the 'proxied'QuartzScheduler.voidstart()Calls the equivalent method on the 'proxied'QuartzScheduler.voidstartDelayed(int seconds)Calls the equivalent method on the 'proxied'QuartzScheduler.voidtriggerJob(JobKey jobKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.voidtriggerJob(JobKey jobKey, JobDataMap data)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.booleanunscheduleJob(TriggerKey triggerKey)Calls the equivalent method on the 'proxied'QuartzScheduler, passing theSchedulingContextassociated with this instance.booleanunscheduleJobs(java.util.List<TriggerKey> triggerKeys)Remove all of the indicateds from the scheduler.Trigger
-
-
-
Method Detail
-
getSchedulerObjectName
protected javax.management.ObjectName getSchedulerObjectName()
Get the name under which the Scheduler MBean is registered on the remote MBean server.
-
setSchedulerObjectName
public void setSchedulerObjectName(java.lang.String schedulerObjectName) throws SchedulerExceptionSet the name under which the Scheduler MBean is registered on the remote MBean server.- Throws:
SchedulerException
-
setSchedulerObjectName
public void setSchedulerObjectName(javax.management.ObjectName schedulerObjectName) throws SchedulerExceptionSet the name under which the Scheduler MBean is registered on the remote MBean server.- Throws:
SchedulerException
-
initialize
public abstract void initialize() throws SchedulerExceptionInitialize this RemoteMBeanScheduler instance, connecting to the remote MBean server.- Throws:
SchedulerException
-
getAttribute
protected abstract java.lang.Object getAttribute(java.lang.String attribute) throws SchedulerExceptionGet the given attribute of the remote Scheduler MBean.- Throws:
SchedulerException
-
getAttributes
protected abstract javax.management.AttributeList getAttributes(java.lang.String[] attributes) throws SchedulerExceptionGet the given attributes of the remote Scheduler MBean.- Throws:
SchedulerException
-
invoke
protected abstract java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws SchedulerExceptionInvoke the given operation on the remote Scheduler MBean.- Throws:
SchedulerException
-
getSchedulerName
public java.lang.String getSchedulerName() throws SchedulerExceptionReturns the name of the
Scheduler.- Specified by:
getSchedulerNamein interfaceScheduler- Throws:
SchedulerException
-
getSchedulerInstanceId
public java.lang.String getSchedulerInstanceId() throws SchedulerExceptionReturns the instance Id of the
Scheduler.- Specified by:
getSchedulerInstanceIdin interfaceScheduler- Throws:
SchedulerException
-
getMetaData
public SchedulerMetaData getMetaData() throws SchedulerException
Description copied from interface:SchedulerGet aSchedulerMetaDataobject 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:
getMetaDatain interfaceScheduler- Throws:
SchedulerException
-
getContext
public SchedulerContext getContext() throws SchedulerException
Returns the
SchedulerContextof theScheduler.- Specified by:
getContextin interfaceScheduler- Throws:
SchedulerException
-
start
public void start() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
startin interfaceScheduler- Throws:
SchedulerException- ifshutdown()has been called, or there is an error within theScheduler.- See Also:
Scheduler.startDelayed(int),Scheduler.standby(),Scheduler.shutdown()
-
startDelayed
public void startDelayed(int seconds) throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
startDelayedin interfaceScheduler- Throws:
SchedulerException- ifshutdown()has been called, or there is an error within theScheduler.- See Also:
Scheduler.start(),Scheduler.standby(),Scheduler.shutdown()
-
standby
public void standby() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
standbyin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.start(),Scheduler.pauseAll()
-
isStarted
public boolean isStarted() throws SchedulerExceptionWhether the scheduler has been started.Note: This only reflects whether
has ever been called on this Scheduler, so it will returnstart()trueeven if theScheduleris currently in standby mode or has been since shutdown.- Specified by:
isStartedin interfaceScheduler- Throws:
SchedulerException- See Also:
start(),isShutdown(),isInStandbyMode()
-
isInStandbyMode
public boolean isInStandbyMode() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
isInStandbyModein interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.standby(),Scheduler.start()
-
shutdown
public void shutdown() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
shutdownin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.shutdown(boolean)
-
shutdown
public void shutdown(boolean waitForJobsToComplete) throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
shutdownin interfaceScheduler- Parameters:
waitForJobsToComplete- iftruethe 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 SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
isShutdownin interfaceScheduler- Throws:
SchedulerException
-
getCurrentlyExecutingJobs
public java.util.List<JobExecutionContext> getCurrentlyExecutingJobs() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
getCurrentlyExecutingJobsin interfaceScheduler- Throws:
SchedulerException- See Also:
JobExecutionContext
-
scheduleJob
public java.util.Date scheduleJob(JobDetail jobDetail, Trigger trigger) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
scheduleJobin interfaceScheduler- Throws:
SchedulerException- if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.
-
scheduleJob
public java.util.Date scheduleJob(Trigger trigger) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
scheduleJobin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
addJobin interfaceScheduler- 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, andreplaceisfalse.- See Also:
Scheduler.addJob(JobDetail, boolean, boolean)
-
addJob
public void addJob(JobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
addJobin interfaceScheduler- 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, andreplaceisfalse.
-
deleteJob
public boolean deleteJob(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
deleteJobin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
unscheduleJobin interfaceScheduler- Throws:
SchedulerException
-
deleteJobs
public boolean deleteJobs(java.util.List<JobKey> jobKeys) throws SchedulerException
Description copied from interface:SchedulerDelete the identifiedJobs from the Scheduler - and any associatedTriggers.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:
deleteJobsin interfaceScheduler- 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(java.util.Map<JobDetail,java.util.Set<? extends Trigger>> triggersAndJobs, boolean replace) throws SchedulerException
Description copied from interface:SchedulerSchedule 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:
scheduleJobsin interfaceScheduler- Throws:
ObjectAlreadyExistsException- if the job/trigger keys are not unique and the replace flag is not set to true.SchedulerException
-
scheduleJob
public void scheduleJob(JobDetail jobDetail, java.util.Set<? extends Trigger> triggersForJob, boolean replace) throws SchedulerException
Description copied from interface:SchedulerSchedule the given job with the related set of triggers.If any of the given job 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:
scheduleJobin interfaceScheduler- Throws:
ObjectAlreadyExistsException- if the job/trigger keys are not unique and the replace flag is not set to true.SchedulerException
-
unscheduleJobs
public boolean unscheduleJobs(java.util.List<TriggerKey> triggerKeys) throws SchedulerException
Description copied from interface:SchedulerRemove all of the indicateds from the scheduler.TriggerIf 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:
unscheduleJobsin interfaceScheduler- Throws:
SchedulerException
-
rescheduleJob
public java.util.Date rescheduleJob(TriggerKey triggerKey, Trigger newTrigger) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
rescheduleJobin interfaceScheduler- Parameters:
triggerKey- identity of the trigger to replacenewTrigger- The newTriggerto be stored.- Returns:
nullif aTriggerwith the given name and group was not found and removed from the store (and the new trigger is therefore not stored), otherwise the first fire time of the newly scheduled trigger is returned.- Throws:
SchedulerException
-
triggerJob
public void triggerJob(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
triggerJobin interfaceScheduler- Throws:
SchedulerException
-
triggerJob
public void triggerJob(JobKey jobKey, JobDataMap data) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
triggerJobin interfaceSchedulerdata- the (possiblynull) 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 theSchedulingContextassociated with this instance.- Specified by:
pauseTriggerin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
pauseTriggersin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
pauseJobin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
pauseJobsin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
resumeTriggerin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
resumeTriggersin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
resumeJobin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
resumeJobsin interfaceScheduler- Parameters:
matcher- The matcher to evaluate against known paused groups- Throws:
SchedulerException- On error- See Also:
Scheduler.pauseJobs(GroupMatcher)
-
pauseAll
public void pauseAll() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
pauseAllin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.resumeAll(),Scheduler.pauseTriggers(org.quartz.impl.matchers.GroupMatcher),Scheduler.standby()
-
resumeAll
public void resumeAll() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
resumeAllin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.pauseAll()
-
getJobGroupNames
public java.util.List<java.lang.String> getJobGroupNames() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getJobGroupNamesin interfaceScheduler- Throws:
SchedulerException
-
getJobKeys
public java.util.Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getJobKeysin interfaceScheduler- Parameters:
matcher- Matcher to evaluate against known groups- Returns:
- Set of all keys matching
- Throws:
SchedulerException- On error
-
getTriggersOfJob
public java.util.List<Trigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getTriggersOfJobin interfaceScheduler- Throws:
SchedulerException
-
getTriggerGroupNames
public java.util.List<java.lang.String> getTriggerGroupNames() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getTriggerGroupNamesin interfaceScheduler- Throws:
SchedulerException
-
getTriggerKeys
public java.util.Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getTriggerKeysin interfaceScheduler- 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 theSchedulingContextassociated with this instance.- Specified by:
getJobDetailin interfaceScheduler- Throws:
SchedulerException
-
getTrigger
public Trigger getTrigger(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
getTriggerin interfaceScheduler- Throws:
SchedulerException
-
checkExists
public boolean checkExists(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
checkExistsin interfaceScheduler- 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:
checkExistsin interfaceScheduler- Parameters:
triggerKey- the identifier to check for- Returns:
- true if a Trigger exists with the given identifier
- Throws:
SchedulerException
-
clear
public void clear() throws SchedulerExceptionDescription copied from interface:Scheduler- Specified by:
clearin interfaceScheduler- Throws:
SchedulerException
-
getTriggerState
public Trigger.TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getTriggerStatein interfaceScheduler- Throws:
SchedulerException- See Also:
Trigger.TriggerState
-
resetTriggerFromErrorState
public void resetTriggerFromErrorState(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
resetTriggerFromErrorStatein interfaceScheduler- Throws:
SchedulerException- See Also:
Trigger.TriggerState
-
addCalendar
public void addCalendar(java.lang.String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
addCalendarin interfaceSchedulerupdateTriggers- 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, andreplaceisfalse.
-
deleteCalendar
public boolean deleteCalendar(java.lang.String calName) throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
deleteCalendarin interfaceScheduler- Returns:
- true if the Calendar was found and deleted.
- Throws:
SchedulerException- if there is an internal Scheduler error, or one or more triggers reference the calendar
-
getCalendar
public Calendar getCalendar(java.lang.String calName) throws SchedulerException
Calls th0e equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getCalendarin interfaceScheduler- Throws:
SchedulerException
-
getCalendarNames
public java.util.List<java.lang.String> getCalendarNames() throws SchedulerExceptionCalls the equivalent method on the 'proxied'
QuartzScheduler, passing theSchedulingContextassociated with this instance.- Specified by:
getCalendarNamesin interfaceScheduler- Throws:
SchedulerException
-
getPausedTriggerGroups
public java.util.Set<java.lang.String> getPausedTriggerGroups() throws SchedulerExceptionDescription copied from interface:SchedulerGet the names of allgroups that are paused.Trigger- Specified by:
getPausedTriggerGroupsin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.getPausedTriggerGroups()
-
getListenerManager
public ListenerManager getListenerManager() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler.- Specified by:
getListenerManagerin interfaceScheduler- 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:SchedulerRequest the interruption, within this Scheduler instance, of all currently executing instances of the identifiedJob, which must be an implementor of theInterruptableJobinterface.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 thatinterrupt()on one instances throws an exception, all remaining instances (that have not yet been interrupted) will not have theirinterrupt()method called.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:
interruptin interfaceScheduler- Returns:
- true if at least one instance of the identified job was found and interrupted.
- Throws:
UnableToInterruptJobException- if the job does not implementInterruptableJob, or there is an exception while interrupting the job.- See Also:
Scheduler.interrupt(JobKey)
-
interrupt
public boolean interrupt(java.lang.String fireInstanceId) throws UnableToInterruptJobExceptionDescription copied from interface:SchedulerRequest the interruption, within this Scheduler instance, of the identified executingJobinstance, which must be an implementor of theInterruptableJobinterface.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:
interruptin interfaceScheduler- Parameters:
fireInstanceId- the unique identifier of the job instance to be interrupted (seeJobExecutionContext.getFireInstanceId()- Returns:
- true if the identified job instance was found and interrupted.
- Throws:
UnableToInterruptJobException- if the job does not implementInterruptableJob, or there is an exception while interrupting the job.- See Also:
InterruptableJob.interrupt(),Scheduler.getCurrentlyExecutingJobs(),JobExecutionContext.getFireInstanceId(),Scheduler.interrupt(JobKey)
-
setJobFactory
public void setJobFactory(JobFactory factory) throws SchedulerException
Description copied from interface:SchedulerSet theJobFactorythat will be responsible for producing instances ofJobclasses.JobFactories may be of use to those wishing to have their application produce
Jobinstances via some special mechanism, such as to give the opportunity for dependency injection.- Specified by:
setJobFactoryin interfaceScheduler- Throws:
SchedulerException- See Also:
Scheduler.setJobFactory(org.quartz.spi.JobFactory)
-
-