Class RemoteScheduler
- java.lang.Object
-
- org.quartz.impl.RemoteScheduler
-
- All Implemented Interfaces:
Scheduler
public class RemoteScheduler extends java.lang.Object implements Scheduler
An implementation of the
Scheduler
interface that remotely proxies all method calls to the equivalent call on a givenQuartzScheduler
instance, via RMI.- Author:
- James House
- 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 RemoteScheduler(java.lang.String schedId, java.lang.String host, int port)
Construct aRemoteScheduler
instance to proxy the givenRemoteableQuartzScheduler
instance, and with the givenSchedulingContext
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCalendar(java.lang.String calName, Calendar calendar, boolean replace, boolean updateTriggers)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
addJob(JobDetail jobDetail, boolean replace)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
addJob(JobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling)
Add the givenJob
to the Scheduler - with no associatedTrigger
.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()
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
deleteCalendar(java.lang.String calName)
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
deleteJob(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
deleteJobs(java.util.List<JobKey> jobKeys)
Delete the identifiedJob
s from the Scheduler - and any associatedTrigger
s.Calendar
getCalendar(java.lang.String calName)
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.List<java.lang.String>
getCalendarNames()
Calls the equivalent method on the 'proxied'QuartzScheduler
.SchedulerContext
getContext()
Returns theSchedulerContext
of theScheduler
.java.util.List<JobExecutionContext>
getCurrentlyExecutingJobs()
Calls the equivalent method on the 'proxied'QuartzScheduler
.JobDetail
getJobDetail(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.List<java.lang.String>
getJobGroupNames()
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.Set<JobKey>
getJobKeys(GroupMatcher<JobKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.ListenerManager
getListenerManager()
Get a reference to the scheduler'sListenerManager
, through which listeners may be registered.SchedulerMetaData
getMetaData()
Get aSchedulerMetaData
object describing the settings and capabilities of the scheduler instance.java.util.Set<java.lang.String>
getPausedTriggerGroups()
Get the names of all
groups that are paused.Trigger
protected RemotableQuartzScheduler
getRemoteScheduler()
java.lang.String
getSchedulerInstanceId()
Returns the instance Id of theScheduler
.java.lang.String
getSchedulerName()
Returns the name of theScheduler
.Trigger
getTrigger(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
.java.util.Set<TriggerKey>
getTriggerKeys(GroupMatcher<TriggerKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.List<? extends Trigger>
getTriggersOfJob(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.Trigger.TriggerState
getTriggerState(TriggerKey triggerKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
interrupt(java.lang.String fireInstanceId)
Request the interruption, within this Scheduler instance, of the identified executingJob
instance, which must be an implementor of theInterruptableJob
interface.boolean
interrupt(JobKey jobKey)
Request the interruption, within this Scheduler instance, of all currently executing instances of the identifiedJob
, which must be an implementor of theInterruptableJob
interface.protected SchedulerException
invalidateHandleCreateException(java.lang.String msg, java.lang.Exception cause)
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
.void
pauseJob(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
pauseJobs(GroupMatcher<JobKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
pauseTrigger(TriggerKey triggerKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
pauseTriggers(GroupMatcher<TriggerKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.Date
rescheduleJob(TriggerKey triggerKey, Trigger newTrigger)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resetTriggerFromErrorState(TriggerKey triggerKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resumeAll()
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resumeJob(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resumeJobs(GroupMatcher<JobKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resumeTrigger(TriggerKey triggerKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
resumeTriggers(GroupMatcher<TriggerKey> matcher)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
scheduleJob(JobDetail jobDetail, java.util.Set<? extends Trigger> triggersForJob, boolean replace)
Schedule the given job with the related set of triggers.java.util.Date
scheduleJob(JobDetail jobDetail, Trigger trigger)
Calls the equivalent method on the 'proxied'QuartzScheduler
.java.util.Date
scheduleJob(Trigger trigger)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
scheduleJobs(java.util.Map<JobDetail,java.util.Set<? extends Trigger>> triggersAndJobs, boolean replace)
Schedule all of the given jobs with the related set of triggers.void
setJobFactory(JobFactory factory)
Set theJobFactory
that will be responsible for producing instances ofJob
classes.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
.void
triggerJob(JobKey jobKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.void
triggerJob(JobKey jobKey, JobDataMap data)
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
unscheduleJob(TriggerKey triggerKey)
Calls the equivalent method on the 'proxied'QuartzScheduler
.boolean
unscheduleJobs(java.util.List<TriggerKey> triggerKeys)
Remove all of the indicated
s from the scheduler.Trigger
-
-
-
Method Detail
-
getRemoteScheduler
protected RemotableQuartzScheduler getRemoteScheduler() throws SchedulerException
- Throws:
SchedulerException
-
invalidateHandleCreateException
protected SchedulerException invalidateHandleCreateException(java.lang.String msg, java.lang.Exception cause)
-
getSchedulerName
public java.lang.String getSchedulerName() throws SchedulerException
Returns the name of the
Scheduler
.- Specified by:
getSchedulerName
in interfaceScheduler
- Throws:
SchedulerException
-
getSchedulerInstanceId
public java.lang.String getSchedulerInstanceId() throws SchedulerException
Returns the instance Id of the
Scheduler
.- Specified by:
getSchedulerInstanceId
in interfaceScheduler
- Throws:
SchedulerException
-
getMetaData
public SchedulerMetaData getMetaData() throws SchedulerException
Description copied from interface:Scheduler
Get aSchedulerMetaData
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 interfaceScheduler
- Throws:
SchedulerException
-
getContext
public SchedulerContext getContext() throws SchedulerException
Returns the
SchedulerContext
of theScheduler
.- Specified by:
getContext
in interfaceScheduler
- Throws:
SchedulerException
-
start
public void start() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
start
in 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 SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
startDelayed
in 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 SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
standby
in interfaceScheduler
- 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
has ever been called on this Scheduler, so it will returnstart()
true
even if theScheduler
is currently in standby mode or has been since shutdown.- Specified by:
isStarted
in interfaceScheduler
- 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 interfaceScheduler
- 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 interfaceScheduler
- 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 interfaceScheduler
- Parameters:
waitForJobsToComplete
- iftrue
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 interfaceScheduler
- Throws:
SchedulerException
-
getCurrentlyExecutingJobs
public java.util.List<JobExecutionContext> getCurrentlyExecutingJobs() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getCurrentlyExecutingJobs
in 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
.- Specified by:
scheduleJob
in 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
.- Specified by:
scheduleJob
in 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
.- Specified by:
addJob
in 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, andreplace
isfalse
.- See Also:
Scheduler.addJob(JobDetail, boolean, boolean)
-
addJob
public void addJob(JobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling) throws SchedulerException
Description copied from interface:Scheduler
Add the givenJob
to the Scheduler - with no associatedTrigger
. TheJob
will be 'dormant' until it is scheduled with aTrigger
, orScheduler.triggerJob()
is called for it.With the
storeNonDurableWhileAwaitingScheduling
parameter set totrue
, a non-durable job can be stored. Once it is scheduled, it will resume normal non-durable behavior (i.e. be deleted once there are no remaining associated triggers).- Specified by:
addJob
in 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, andreplace
isfalse
.
-
deleteJobs
public boolean deleteJobs(java.util.List<JobKey> jobKeys) throws SchedulerException
Description copied from interface:Scheduler
Delete the identifiedJob
s from the Scheduler - and any associatedTrigger
s.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 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: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 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:Scheduler
Schedule 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:
scheduleJob
in 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:Scheduler
Remove all of the indicated
s from the scheduler.Trigger
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 interfaceScheduler
- Throws:
SchedulerException
-
deleteJob
public boolean deleteJob(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
deleteJob
in 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
.- Specified by:
unscheduleJob
in interfaceScheduler
- Throws:
SchedulerException
-
rescheduleJob
public java.util.Date rescheduleJob(TriggerKey triggerKey, Trigger newTrigger) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
rescheduleJob
in interfaceScheduler
- Parameters:
triggerKey
- identity of the trigger to replacenewTrigger
- The newTrigger
to be stored.- Returns:
null
if aTrigger
with 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
.- Specified by:
triggerJob
in interfaceScheduler
- Throws:
SchedulerException
-
triggerJob
public void triggerJob(JobKey jobKey, JobDataMap data) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
triggerJob
in interfaceScheduler
data
- 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
.- Specified by:
pauseTrigger
in 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
.- Specified by:
pauseTriggers
in 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
.- Specified by:
pauseJob
in 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
.- Specified by:
pauseJobs
in 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
.- Specified by:
resumeTrigger
in 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
.- Specified by:
resumeTriggers
in 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
.- Specified by:
resumeJob
in 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
.- Specified by:
resumeJobs
in 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 SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
pauseAll
in interfaceScheduler
- 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
.- Specified by:
resumeAll
in interfaceScheduler
- Throws:
SchedulerException
- See Also:
Scheduler.pauseAll()
-
getJobGroupNames
public java.util.List<java.lang.String> getJobGroupNames() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getJobGroupNames
in interfaceScheduler
- Throws:
SchedulerException
-
getJobKeys
public java.util.Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getJobKeys
in interfaceScheduler
- Parameters:
matcher
- Matcher to evaluate against known groups- Returns:
- Set of all keys matching
- Throws:
SchedulerException
- On error
-
getTriggersOfJob
public java.util.List<? extends Trigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getTriggersOfJob
in interfaceScheduler
- Throws:
SchedulerException
-
getTriggerGroupNames
public java.util.List<java.lang.String> getTriggerGroupNames() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getTriggerGroupNames
in interfaceScheduler
- Throws:
SchedulerException
-
getTriggerKeys
public java.util.Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getTriggerKeys
in 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
.- Specified by:
getJobDetail
in interfaceScheduler
- Throws:
SchedulerException
-
checkExists
public boolean checkExists(JobKey jobKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
checkExists
in 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:
checkExists
in 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 SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
clear
in interfaceScheduler
- Throws:
SchedulerException
-
getTrigger
public Trigger getTrigger(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getTrigger
in interfaceScheduler
- Throws:
SchedulerException
-
getTriggerState
public Trigger.TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getTriggerState
in interfaceScheduler
- Throws:
SchedulerException
- See Also:
Trigger.TriggerState
-
resetTriggerFromErrorState
public void resetTriggerFromErrorState(TriggerKey triggerKey) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
resetTriggerFromErrorState
in interfaceScheduler
- Throws:
SchedulerException
- See Also:
Trigger.TriggerState
-
addCalendar
public void addCalendar(java.lang.String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
addCalendar
in interfaceScheduler
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, andreplace
isfalse
.
-
deleteCalendar
public boolean deleteCalendar(java.lang.String calName) throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
deleteCalendar
in 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 the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getCalendar
in interfaceScheduler
- Throws:
SchedulerException
-
getCalendarNames
public java.util.List<java.lang.String> getCalendarNames() throws SchedulerException
Calls the equivalent method on the 'proxied'
QuartzScheduler
.- Specified by:
getCalendarNames
in interfaceScheduler
- Throws:
SchedulerException
-
getPausedTriggerGroups
public java.util.Set<java.lang.String> getPausedTriggerGroups() throws SchedulerException
Description copied from interface:Scheduler
Get the names of all
groups that are paused.Trigger
- Specified by:
getPausedTriggerGroups
in interfaceScheduler
- Throws:
SchedulerException
- See Also:
Scheduler.getPausedTriggerGroups()
-
getListenerManager
public ListenerManager getListenerManager() throws SchedulerException
Description copied from interface:Scheduler
Get a reference to the scheduler'sListenerManager
, through which listeners may be registered.- Specified by:
getListenerManager
in 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:Scheduler
Request the interruption, within this Scheduler instance, of all currently executing instances of the identifiedJob
, which must be an implementor of theInterruptableJob
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 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:
interrupt
in 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 UnableToInterruptJobException
Description copied from interface:Scheduler
Request the interruption, within this Scheduler instance, of the identified executingJob
instance, which must be an implementor of theInterruptableJob
interface.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 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:Scheduler
Set theJobFactory
that will be responsible for producing instances ofJob
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 interfaceScheduler
- Throws:
SchedulerException
- See Also:
Scheduler.setJobFactory(org.quartz.spi.JobFactory)
-
-