|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.quartz.core Class QuartzScheduler
java.lang.Object org.quartz.core.QuartzScheduler
- All Implemented Interfaces:
- Remote, RemotableQuartzScheduler
public class QuartzScheduler
- extends Object
- implements RemotableQuartzScheduler
This is the heart of Quartz, an indirect implementation of the Scheduler
interface, containing methods to schedule Job
s,
register JobListener
instances, etc.
- Author:
- James House
- See Also:
Scheduler
,QuartzSchedulerThread
,JobStore
,ThreadPool
Constructor Summary | |
---|---|
QuartzScheduler(QuartzSchedulerResources resources,
long idleWaitTime,
long dbRetryInterval)
Create a QuartzScheduler with the given configuration
properties. |
Method Summary | |
---|---|
void |
addCalendar(String calName,
Calendar calendar,
boolean replace,
boolean updateTriggers)
Add (register) the given Calendar to the Scheduler. |
void |
addInternalJobListener(JobListener jobListener)
Add the given
JobListener to the
Scheduler 's internal list. |
void |
addInternalSchedulerListener(SchedulerListener schedulerListener)
Register the given
SchedulerListener with the
Scheduler 's list of internal listeners. |
void |
addInternalTriggerListener(TriggerListener triggerListener)
Add the given
TriggerListener to the
Scheduler 's internal list. |
void |
addJob(JobDetail jobDetail,
boolean replace)
Add the given Job to the Scheduler - with no associated
Trigger . |
void |
addNoGCObject(Object obj)
|
boolean |
checkExists(JobKey jobKey)
Determine whether a Job with the given identifier already
exists within the scheduler. |
boolean |
checkExists(TriggerKey triggerKey)
Determine whether a Trigger with the given identifier already
exists within the scheduler. |
void |
clear()
Clears (deletes!) all scheduling data - all Job s, Trigger s
Calendar s. |
boolean |
deleteCalendar(String calName)
Delete the identified Calendar from the Scheduler. |
boolean |
deleteJob(JobKey jobKey)
Delete the identified Job from the Scheduler - and any
associated Trigger s. |
boolean |
deleteJobs(List<JobKey> jobKeys)
|
Calendar |
getCalendar(String calName)
Get the
Calendar instance with the given name. |
List<String> |
getCalendarNames()
Get the names of all registered
Calendar s. |
List<JobExecutionContext> |
getCurrentlyExecutingJobs()
Return a list of JobExecutionContext objects that
represent all currently executing Jobs in this Scheduler instance. |
JobListener |
getInternalJobListener(String name)
Get the internal
JobListener
that has the given name. |
List<JobListener> |
getInternalJobListeners()
Get a List containing all of the
JobListener s
in the Scheduler 's internal list. |
List<SchedulerListener> |
getInternalSchedulerListeners()
Get a List containing all of the internal
SchedulerListener s
registered with the Scheduler . |
TriggerListener |
getInternalTriggerListener(String name)
Get the internal
TriggerListener that
has the given name. |
List<TriggerListener> |
getInternalTriggerListeners()
Get a list containing all of the
TriggerListener s
in the Scheduler 's internal list. |
JobDetail |
getJobDetail(JobKey jobKey)
Get the
JobDetail for the Job
instance with the given name and group. |
org.quartz.spi.JobFactory |
getJobFactory()
|
List<String> |
getJobGroupNames()
Get the names of all known
Job groups. |
Set<JobKey> |
getJobKeys(GroupMatcher<JobKey> matcher)
Get the names of all the
Job s in the
matching groups. |
Class |
getJobStoreClass()
|
ListenerManager |
getListenerManager()
|
org.slf4j.Logger |
getLog()
|
Set |
getPausedTriggerGroups()
|
SchedulerContext |
getSchedulerContext()
Returns the SchedulerContext of the Scheduler . |
String |
getSchedulerInstanceId()
Returns the instance Id of the QuartzScheduler . |
String |
getSchedulerName()
Returns the name of the QuartzScheduler . |
org.quartz.spi.SchedulerSignaler |
getSchedulerSignaler()
|
ThreadGroup |
getSchedulerThreadGroup()
Returns the name of the thread group for Quartz's main threads. |
Class |
getThreadPoolClass()
|
int |
getThreadPoolSize()
|
Trigger |
getTrigger(TriggerKey triggerKey)
Get the
Trigger instance with the given name and
group. |
List<String> |
getTriggerGroupNames()
Get the names of all known
Trigger
groups. |
Set<TriggerKey> |
getTriggerKeys(GroupMatcher<TriggerKey> matcher)
Get the names of all the
Trigger s in
the matching groups. |
List<? extends Trigger> |
getTriggersOfJob(JobKey jobKey)
Get all
Trigger s that are associated with the
identified
JobDetail . |
Trigger.TriggerState |
getTriggerState(TriggerKey triggerKey)
Get the current state of the identified
Trigger . |
String |
getVersion()
|
static String |
getVersionIteration()
|
static String |
getVersionMajor()
|
static String |
getVersionMinor()
|
void |
initialize()
|
boolean |
interrupt(JobKey jobKey)
Interrupt all instances of the identified InterruptableJob executing in this Scheduler instance. |
boolean |
isClustered()
|
boolean |
isInStandbyMode()
Reports whether the Scheduler is paused. |
boolean |
isShutdown()
Reports whether the Scheduler has been shutdown. |
boolean |
isShuttingDown()
|
boolean |
isSignalOnSchedulingChange()
|
boolean |
isStarted()
|
void |
notifyJobListenersToBeExecuted(JobExecutionContext jec)
|
void |
notifyJobListenersWasExecuted(JobExecutionContext jec,
JobExecutionException je)
|
void |
notifyJobListenersWasVetoed(JobExecutionContext jec)
|
protected void |
notifyJobStoreJobComplete(org.quartz.spi.OperableTrigger trigger,
JobDetail detail,
Trigger.CompletedExecutionInstruction instCode)
|
protected void |
notifyJobStoreJobVetoed(org.quartz.spi.OperableTrigger trigger,
JobDetail detail,
Trigger.CompletedExecutionInstruction instCode)
|
void |
notifySchedulerListenersError(String msg,
SchedulerException se)
|
void |
notifySchedulerListenersFinalized(Trigger trigger)
|
void |
notifySchedulerListenersInStandbyMode()
|
void |
notifySchedulerListenersJobAdded(JobDetail jobDetail)
|
void |
notifySchedulerListenersJobDeleted(JobKey jobKey)
|
void |
notifySchedulerListenersPausedJob(JobKey key)
|
void |
notifySchedulerListenersPausedJobs(String group)
|
void |
notifySchedulerListenersPausedTrigger(TriggerKey triggerKey)
|
void |
notifySchedulerListenersPausedTriggers(String group)
|
void |
notifySchedulerListenersResumedJob(JobKey key)
|
void |
notifySchedulerListenersResumedJobs(String group)
|
void |
notifySchedulerListenersResumedTrigger(TriggerKey key)
|
void |
notifySchedulerListenersResumedTriggers(String group)
|
void |
notifySchedulerListenersSchduled(Trigger trigger)
|
void |
notifySchedulerListenersShutdown()
|
void |
notifySchedulerListenersShuttingdown()
|
void |
notifySchedulerListenersStarted()
|
void |
notifySchedulerListenersUnscheduled(TriggerKey triggerKey)
|
protected void |
notifySchedulerThread(long candidateNewNextFireTime)
|
void |
notifyTriggerListenersComplete(JobExecutionContext jec,
Trigger.CompletedExecutionInstruction instCode)
|
boolean |
notifyTriggerListenersFired(JobExecutionContext jec)
|
void |
notifyTriggerListenersMisfired(Trigger trigger)
|
int |
numJobsExecuted()
|
void |
pauseAll()
Pause all triggers - equivalent of calling pauseTriggers(GroupMatcher
with a matcher matching all known groups. |
void |
pauseJob(JobKey jobKey)
Pause the
JobDetail with the given
name - by pausing all of its current Trigger s. |
void |
pauseJobs(GroupMatcher<JobKey> groupMatcher)
Pause all of the
JobDetail s in the
matching groups - by pausing all of their Trigger s. |
void |
pauseTrigger(TriggerKey triggerKey)
Pause the
Trigger with the given name. |
void |
pauseTriggers(GroupMatcher<TriggerKey> matcher)
Pause all of the
Trigger s in the matching groups. |
boolean |
removeInternalJobListener(String name)
Remove the identified
JobListener from the Scheduler 's
list of internal listeners. |
boolean |
removeInternalSchedulerListener(SchedulerListener schedulerListener)
Remove the given
SchedulerListener from the
Scheduler 's list of internal listeners. |
boolean |
removeinternalTriggerListener(String name)
Remove the identified
TriggerListener from the Scheduler 's
list of internal listeners. |
boolean |
removeNoGCObject(Object obj)
|
Date |
rescheduleJob(TriggerKey triggerKey,
Trigger newTrigger)
Remove (delete) the
Trigger with the
given name, and store the new given one - which must be associated
with the same job. |
void |
resumeAll()
Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group)
on every group. |
void |
resumeJob(JobKey jobKey)
Resume (un-pause) the
JobDetail with
the given name. |
void |
resumeJobs(GroupMatcher<JobKey> matcher)
Resume (un-pause) all of the
JobDetail s
in the matching groups. |
void |
resumeTrigger(TriggerKey triggerKey)
Resume (un-pause) the
Trigger with the given
name. |
void |
resumeTriggers(GroupMatcher<TriggerKey> matcher)
Resume (un-pause) all of the
Trigger s in the
matching groups. |
Date |
runningSince()
|
Date |
scheduleJob(JobDetail jobDetail,
Trigger trigger)
Add the
Job identified by the given
JobDetail to the Scheduler, and
associate the given
Trigger with it. |
Date |
scheduleJob(Trigger trigger)
Schedule the given
Trigger with the
Job identified by the Trigger 's settings. |
void |
scheduleJobs(Map<JobDetail,List<Trigger>> triggersAndJobs,
boolean replace)
|
void |
setJobFactory(org.quartz.spi.JobFactory factory)
|
void |
setSignalOnSchedulingChange(boolean signalOnSchedulingChange)
|
void |
shutdown()
Halts the QuartzScheduler 's firing of
Trigger s,
and cleans up all resources associated with the QuartzScheduler. |
void |
shutdown(boolean waitForJobsToComplete)
Halts the QuartzScheduler 's firing of
Trigger s,
and cleans up all resources associated with the QuartzScheduler. |
void |
standby()
Temporarily halts the QuartzScheduler 's firing of
Trigger s. |
void |
start()
Starts the QuartzScheduler 's threads that fire
Trigger s. |
void |
startDelayed(int seconds)
|
boolean |
supportsPersistence()
|
void |
triggerJob(JobKey jobKey,
JobDataMap data)
Trigger the identified
Job (execute it
now) - with a non-volatile trigger. |
void |
triggerJob(org.quartz.spi.OperableTrigger trig)
Store and schedule the identified
OperableTrigger |
boolean |
unscheduleJob(TriggerKey triggerKey)
Remove the indicated
Trigger from the
scheduler. |
boolean |
unscheduleJobs(List<TriggerKey> triggerKeys)
|
void |
validateState()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
QuartzScheduler
public QuartzScheduler(QuartzSchedulerResources resources, long idleWaitTime, long dbRetryInterval) throws SchedulerException
Create a
QuartzScheduler
with the given configuration properties.- Throws:
SchedulerException
- See Also:
QuartzSchedulerResources
Method Detail |
---|
initialize
public void initialize() throws SchedulerException
- Throws:
SchedulerException
getVersion
public String getVersion()
- Specified by:
getVersion
in interfaceRemotableQuartzScheduler
getVersionMajor
public static String getVersionMajor()
getVersionMinor
public static String getVersionMinor()
getVersionIteration
public static String getVersionIteration()
getSchedulerSignaler
public org.quartz.spi.SchedulerSignaler getSchedulerSignaler()
getLog
public org.slf4j.Logger getLog()
getSchedulerName
public String getSchedulerName()
Returns the name of the
QuartzScheduler
.- Specified by:
getSchedulerName
in interfaceRemotableQuartzScheduler
getSchedulerInstanceId
public String getSchedulerInstanceId()
Returns the instance Id of the
QuartzScheduler
.- Specified by:
getSchedulerInstanceId
in interfaceRemotableQuartzScheduler
getSchedulerThreadGroup
public ThreadGroup getSchedulerThreadGroup()
Returns the name of the thread group for Quartz's main threads.
addNoGCObject
public void addNoGCObject(Object obj)
removeNoGCObject
public boolean removeNoGCObject(Object obj)
getSchedulerContext
public SchedulerContext getSchedulerContext() throws SchedulerException
Returns the
SchedulerContext
of theScheduler
.- Specified by:
getSchedulerContext
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
isSignalOnSchedulingChange
public boolean isSignalOnSchedulingChange()
setSignalOnSchedulingChange
public void setSignalOnSchedulingChange(boolean signalOnSchedulingChange)
start
public void start() throws SchedulerException
Starts the
QuartzScheduler
's threads that fireTrigger
s.All
Trigger
s that have misfired will be passed to the appropriate TriggerListener(s).- Specified by:
start
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
startDelayed
public void startDelayed(int seconds) throws SchedulerException
- Specified by:
startDelayed
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
standby
public void standby()
Temporarily halts the
QuartzScheduler
's firing ofTrigger
s.The scheduler is not destroyed, and can be re-started at any time.
- Specified by:
standby
in interfaceRemotableQuartzScheduler
isInStandbyMode
public boolean isInStandbyMode()
Reports whether the
Scheduler
is paused.- Specified by:
isInStandbyMode
in interfaceRemotableQuartzScheduler
runningSince
public Date runningSince()
- Specified by:
runningSince
in interfaceRemotableQuartzScheduler
numJobsExecuted
public int numJobsExecuted()
- Specified by:
numJobsExecuted
in interfaceRemotableQuartzScheduler
getJobStoreClass
public Class getJobStoreClass()
- Specified by:
getJobStoreClass
in interfaceRemotableQuartzScheduler
supportsPersistence
public boolean supportsPersistence()
- Specified by:
supportsPersistence
in interfaceRemotableQuartzScheduler
isClustered
public boolean isClustered()
- Specified by:
isClustered
in interfaceRemotableQuartzScheduler
getThreadPoolClass
public Class getThreadPoolClass()
- Specified by:
getThreadPoolClass
in interfaceRemotableQuartzScheduler
getThreadPoolSize
public int getThreadPoolSize()
- Specified by:
getThreadPoolSize
in interfaceRemotableQuartzScheduler
shutdown
public void shutdown()
Halts the
QuartzScheduler
's firing ofTrigger
s, and cleans up all resources associated with the QuartzScheduler. Equivalent toshutdown(false)
.The scheduler cannot be re-started.
- Specified by:
shutdown
in interfaceRemotableQuartzScheduler
shutdown
public void shutdown(boolean waitForJobsToComplete)
Halts the
QuartzScheduler
's firing ofTrigger
s, and cleans up all resources associated with the QuartzScheduler.The scheduler cannot be re-started.
- Specified by:
shutdown
in interfaceRemotableQuartzScheduler
- Parameters:
waitForJobsToComplete
- iftrue
the scheduler will not allow this method to return until all currently executing jobs have completed.
isShutdown
public boolean isShutdown()
Reports whether the
Scheduler
has been shutdown.- Specified by:
isShutdown
in interfaceRemotableQuartzScheduler
isShuttingDown
public boolean isShuttingDown()
isStarted
public boolean isStarted()
validateState
public void validateState() throws SchedulerException
- Throws:
SchedulerException
getCurrentlyExecutingJobs
public List<JobExecutionContext> getCurrentlyExecutingJobs()
Return a list of
JobExecutionContext
objects that represent all currently executing Jobs in this Scheduler instance.This method is not cluster aware. That is, it will only return Jobs currently executing in this Scheduler instance, not across the entire cluster.
Note that the list returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true list of executing jobs may be different.
- Specified by:
getCurrentlyExecutingJobs
in interfaceRemotableQuartzScheduler
scheduleJob
public Date scheduleJob(JobDetail jobDetail, Trigger trigger) throws SchedulerException
Add the
Job
identified by the givenJobDetail
to the Scheduler, and associate the givenTrigger
with it.If the given Trigger does not reference any
Job
, then it will be set to reference the Job passed with it into this method.- Specified by:
scheduleJob
in interfaceRemotableQuartzScheduler
- 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
Schedule the given
Trigger
with theJob
identified by theTrigger
's settings.- Specified by:
scheduleJob
in interfaceRemotableQuartzScheduler
- 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
Add the given
Job
to the Scheduler - with no associatedTrigger
. TheJob
will be 'dormant' until it is scheduled with aTrigger
, orScheduler.triggerJob()
is called for it.The
Job
must by definition be 'durable', if it is not, SchedulerException will be thrown.- Specified by:
addJob
in interfaceRemotableQuartzScheduler
- 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
.
deleteJob
public boolean deleteJob(JobKey jobKey) throws SchedulerException
Delete the identified
Job
from the Scheduler - and any associatedTrigger
s.- Specified by:
deleteJob
in interfaceRemotableQuartzScheduler
- Returns:
- true if the Job was found and deleted.
- Throws:
SchedulerException
- if there is an internal Scheduler error.
deleteJobs
public boolean deleteJobs(List<JobKey> jobKeys) throws SchedulerException
- Specified by:
deleteJobs
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
scheduleJobs
public void scheduleJobs(Map<JobDetail,List<Trigger>> triggersAndJobs, boolean replace) throws SchedulerException
- Specified by:
scheduleJobs
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
unscheduleJobs
public boolean unscheduleJobs(List<TriggerKey> triggerKeys) throws SchedulerException
- Specified by:
unscheduleJobs
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
unscheduleJob
public boolean unscheduleJob(TriggerKey triggerKey) throws SchedulerException
Remove the indicated
Trigger
from the scheduler.- Specified by:
unscheduleJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
rescheduleJob
public Date rescheduleJob(TriggerKey triggerKey, Trigger newTrigger) throws SchedulerException
Remove (delete) the
Trigger
with the given name, and store the new given one - which must be associated with the same job.- Specified by:
rescheduleJob
in interfaceRemotableQuartzScheduler
- Parameters:
newTrigger
- The newTrigger
to be stored.- Returns:
null
if aTrigger
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, JobDataMap data) throws SchedulerException
Trigger the identified
Job
(execute it now) - with a non-volatile trigger.- Specified by:
triggerJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
triggerJob
public void triggerJob(org.quartz.spi.OperableTrigger trig) throws SchedulerException
Store and schedule the identified
OperableTrigger
- Specified by:
triggerJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
pauseTrigger
public void pauseTrigger(TriggerKey triggerKey) throws SchedulerException
Pause the
Trigger
with the given name.- Specified by:
pauseTrigger
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
pauseTriggers
public void pauseTriggers(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Pause all of the
Trigger
s in the matching groups.- Specified by:
pauseTriggers
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
pauseJob
public void pauseJob(JobKey jobKey) throws SchedulerException
Pause the
JobDetail
with the given name - by pausing all of its currentTrigger
s.- Specified by:
pauseJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
pauseJobs
public void pauseJobs(GroupMatcher<JobKey> groupMatcher) throws SchedulerException
Pause all of the
JobDetail
s in the matching groups - by pausing all of theirTrigger
s.- Specified by:
pauseJobs
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
resumeTrigger
public void resumeTrigger(TriggerKey triggerKey) throws SchedulerException
Resume (un-pause) the
Trigger
with the given name.If the
Trigger
missed one or more fire-times, then theTrigger
's misfire instruction will be applied.- Specified by:
resumeTrigger
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
resumeTriggers
public void resumeTriggers(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Resume (un-pause) all of the
Trigger
s in the matching groups.If any
Trigger
missed one or more fire-times, then theTrigger
's misfire instruction will be applied.- Specified by:
resumeTriggers
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getPausedTriggerGroups
public Set getPausedTriggerGroups() throws SchedulerException
- Specified by:
getPausedTriggerGroups
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
resumeJob
public void resumeJob(JobKey jobKey) throws SchedulerException
Resume (un-pause) the
JobDetail
with the given name.If any of the
Job
'sTrigger
s missed one or more fire-times, then theTrigger
's misfire instruction will be applied.- Specified by:
resumeJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
resumeJobs
public void resumeJobs(GroupMatcher<JobKey> matcher) throws SchedulerException
Resume (un-pause) all of the
JobDetail
s in the matching groups.If any of the
Job
s hadTrigger
s that missed one or more fire-times, then theTrigger
's misfire instruction will be applied.- Specified by:
resumeJobs
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
pauseAll
public void pauseAll() throws SchedulerException
Pause all triggers - equivalent of calling
pauseTriggers(GroupMatcher
with a matcher matching all known groups.) When
resumeAll()
is called (to un-pause), trigger misfire instructions WILL be applied.- Specified by:
pauseAll
in interfaceRemotableQuartzScheduler
resumeAll
public void resumeAll() throws SchedulerException
Resume (un-pause) all triggers - equivalent of calling
resumeTriggerGroup(group)
on every group.If any
Trigger
missed one or more fire-times, then theTrigger
's misfire instruction will be applied.- Specified by:
resumeAll
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
- See Also:
pauseAll()
getJobGroupNames
public List<String> getJobGroupNames() throws SchedulerException
Get the names of all known
Job
groups.- Specified by:
getJobGroupNames
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getJobKeys
public Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) throws SchedulerException
Get the names of all the
Job
s in the matching groups.- Specified by:
getJobKeys
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getTriggersOfJob
public List<? extends Trigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException
Get all
Trigger
s that are associated with the identifiedJobDetail
.- Specified by:
getTriggersOfJob
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getTriggerGroupNames
public List<String> getTriggerGroupNames() throws SchedulerException
Get the names of all known
Trigger
groups.- Specified by:
getTriggerGroupNames
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getTriggerKeys
public Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Get the names of all the
Trigger
s in the matching groups.- Specified by:
getTriggerKeys
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getJobDetail
public JobDetail getJobDetail(JobKey jobKey) throws SchedulerException
Get the
JobDetail
for theJob
instance with the given name and group.- Specified by:
getJobDetail
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getTrigger
public Trigger getTrigger(TriggerKey triggerKey) throws SchedulerException
Get the
Trigger
instance with the given name and group.- Specified by:
getTrigger
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
checkExists
public boolean checkExists(JobKey jobKey) throws SchedulerException
- Determine whether a
Job
with the given identifier already exists within the scheduler. - Specified by:
checkExists
in interfaceRemotableQuartzScheduler
- 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
- Determine whether a
Trigger
with the given identifier already exists within the scheduler. - Specified by:
checkExists
in interfaceRemotableQuartzScheduler
- 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
- Clears (deletes!) all scheduling data - all
Job
s,Trigger
sCalendar
s. - Specified by:
clear
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getTriggerState
public Trigger.TriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException
Get the current state of the identified
Trigger
.- Specified by:
getTriggerState
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
- See Also:
Trigger.TriggerState
addCalendar
public void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) throws SchedulerException
Add (register) the given
Calendar
to the Scheduler.- Specified by:
addCalendar
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
- if there is an internal Scheduler error, or a Calendar with the same name already exists, andreplace
isfalse
.
deleteCalendar
public boolean deleteCalendar(String calName) throws SchedulerException
Delete the identified
Calendar
from the Scheduler.- Specified by:
deleteCalendar
in interfaceRemotableQuartzScheduler
- 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
Get the
Calendar
instance with the given name.- Specified by:
getCalendar
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getCalendarNames
public List<String> getCalendarNames() throws SchedulerException
Get the names of all registered
Calendar
s.- Specified by:
getCalendarNames
in interfaceRemotableQuartzScheduler
- Throws:
SchedulerException
getListenerManager
public ListenerManager getListenerManager()
addInternalJobListener
public void addInternalJobListener(JobListener jobListener)
Add the given
JobListener
to theScheduler
's internal list.
removeInternalJobListener
public boolean removeInternalJobListener(String name)
Remove the identified
JobListener
from theScheduler
's list of internal listeners.- Returns:
- true if the identified listener was found in the list, and removed.
getInternalJobListeners
public List<JobListener> getInternalJobListeners()
Get a List containing all of the
JobListener
s in theScheduler
's internal list.
getInternalJobListener
public JobListener getInternalJobListener(String name)
Get the internal
JobListener
that has the given name.
addInternalTriggerListener
public void addInternalTriggerListener(TriggerListener triggerListener)
Add the given
TriggerListener
to theScheduler
's internal list.
removeinternalTriggerListener
public boolean removeinternalTriggerListener(String name)
Remove the identified
TriggerListener
from theScheduler
's list of internal listeners.- Returns:
- true if the identified listener was found in the list, and removed.
getInternalTriggerListeners
public List<TriggerListener> getInternalTriggerListeners()
Get a list containing all of the
TriggerListener
s in theScheduler
's internal list.
getInternalTriggerListener
public TriggerListener getInternalTriggerListener(String name)
Get the internal
TriggerListener
that has the given name.
addInternalSchedulerListener
public void addInternalSchedulerListener(SchedulerListener schedulerListener)
Register the given
SchedulerListener
with theScheduler
's list of internal listeners.
removeInternalSchedulerListener
public boolean removeInternalSchedulerListener(SchedulerListener schedulerListener)
Remove the given
SchedulerListener
from theScheduler
's list of internal listeners.- Returns:
- true if the identified listener was found in the list, and removed.
getInternalSchedulerListeners
public List<SchedulerListener> getInternalSchedulerListeners()
Get a List containing all of the internal
SchedulerListener
s registered with theScheduler
.
notifyJobStoreJobComplete
protected void notifyJobStoreJobComplete(org.quartz.spi.OperableTrigger trigger, JobDetail detail, Trigger.CompletedExecutionInstruction instCode) throws JobPersistenceException
- Throws:
JobPersistenceException
notifyJobStoreJobVetoed
protected void notifyJobStoreJobVetoed(org.quartz.spi.OperableTrigger trigger, JobDetail detail, Trigger.CompletedExecutionInstruction instCode) throws JobPersistenceException
- Throws:
JobPersistenceException
notifySchedulerThread
protected void notifySchedulerThread(long candidateNewNextFireTime)
notifyTriggerListenersFired
public boolean notifyTriggerListenersFired(JobExecutionContext jec) throws SchedulerException
- Throws:
SchedulerException
notifyTriggerListenersMisfired
public void notifyTriggerListenersMisfired(Trigger trigger) throws SchedulerException
- Throws:
SchedulerException
notifyTriggerListenersComplete
public void notifyTriggerListenersComplete(JobExecutionContext jec, Trigger.CompletedExecutionInstruction instCode) throws SchedulerException
- Throws:
SchedulerException
notifyJobListenersToBeExecuted
public void notifyJobListenersToBeExecuted(JobExecutionContext jec) throws SchedulerException
- Throws:
SchedulerException
notifyJobListenersWasVetoed
public void notifyJobListenersWasVetoed(JobExecutionContext jec) throws SchedulerException
- Throws:
SchedulerException
notifyJobListenersWasExecuted
public void notifyJobListenersWasExecuted(JobExecutionContext jec, JobExecutionException je) throws SchedulerException
- Throws:
SchedulerException
notifySchedulerListenersError
public void notifySchedulerListenersError(String msg, SchedulerException se)
notifySchedulerListenersSchduled
public void notifySchedulerListenersSchduled(Trigger trigger)
notifySchedulerListenersUnscheduled
public void notifySchedulerListenersUnscheduled(TriggerKey triggerKey)
notifySchedulerListenersFinalized
public void notifySchedulerListenersFinalized(Trigger trigger)
notifySchedulerListenersPausedTrigger
public void notifySchedulerListenersPausedTrigger(TriggerKey triggerKey)
notifySchedulerListenersPausedTriggers
public void notifySchedulerListenersPausedTriggers(String group)
notifySchedulerListenersResumedTrigger
public void notifySchedulerListenersResumedTrigger(TriggerKey key)
notifySchedulerListenersResumedTriggers
public void notifySchedulerListenersResumedTriggers(String group)
notifySchedulerListenersPausedJob
public void notifySchedulerListenersPausedJob(JobKey key)
notifySchedulerListenersPausedJobs
public void notifySchedulerListenersPausedJobs(String group)
notifySchedulerListenersResumedJob
public void notifySchedulerListenersResumedJob(JobKey key)
notifySchedulerListenersResumedJobs
public void notifySchedulerListenersResumedJobs(String group)
notifySchedulerListenersInStandbyMode
public void notifySchedulerListenersInStandbyMode()
notifySchedulerListenersStarted
public void notifySchedulerListenersStarted()
notifySchedulerListenersShutdown
public void notifySchedulerListenersShutdown()
notifySchedulerListenersShuttingdown
public void notifySchedulerListenersShuttingdown()
notifySchedulerListenersJobAdded
public void notifySchedulerListenersJobAdded(JobDetail jobDetail)
notifySchedulerListenersJobDeleted
public void notifySchedulerListenersJobDeleted(JobKey jobKey)
setJobFactory
public void setJobFactory(org.quartz.spi.JobFactory factory) throws SchedulerException
- Throws:
SchedulerException
getJobFactory
public org.quartz.spi.JobFactory getJobFactory()
interrupt
public boolean interrupt(JobKey jobKey) throws UnableToInterruptJobException
- Interrupt all instances of the identified InterruptableJob executing in
this Scheduler instance.
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 interfaceRemotableQuartzScheduler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2001-2011, Terracotta, Inc.