public class QuartzScheduler extends Object implements IQuartzScheduler
This is the heart of Quartz, an indirect implementation of the
interface, containing
methods to schedule ISchedulers, register
IJob instances, etc.
IJobListener
IScheduler,
QuartzSchedulerThread,
IJobStore,
IThreadPool| Constructor and Description |
|---|
QuartzScheduler(QuartzSchedulerResources resources,
long idleWaitTime)
Create a
QuartzScheduler with the given configuration
properties. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCalendar(String calName,
ICalendar calendar,
boolean replace,
boolean updateTriggers)
Add (register) the given
Calendar to the Scheduler. |
void |
addInternalJobListener(IJobListener jobListener)
Add the given
to the
Scheduler's internal list. |
void |
addInternalSchedulerListener(ISchedulerListener schedulerListener)
Register the given
with the
Scheduler's list of internal listeners. |
void |
addInternalTriggerListener(ITriggerListener triggerListener)
Add the given
to
the Scheduler's internal list. |
void |
addJob(IJobDetail jobDetail,
boolean replace)
Add the given
Job to the Scheduler - with no associated
Trigger. |
void |
addJob(IJobDetail jobDetail,
boolean replace,
boolean storeNonDurableWhileAwaitingScheduling) |
void |
addNoGCObject(Object obj) |
boolean |
checkExists(JobKey jobKey)
Determine whether a
IJob with the given identifier already exists
within the scheduler. |
boolean |
checkExists(TriggerKey triggerKey)
Determine whether a
ITrigger with the given identifier already
exists within the scheduler. |
void |
clear()
Clears (deletes!)
|
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 Triggers. |
boolean |
deleteJobs(List<JobKey> jobKeys) |
ICalendar |
getCalendar(String calName)
Get the
instance with the given name. |
com.helger.commons.collection.impl.ICommonsList<String> |
getCalendarNames()
Get the names of all registered
. |
com.helger.commons.collection.impl.ICommonsList<IJobExecutionContext> |
getCurrentlyExecutingJobs()
Return a list of
JobExecutionContext objects that represent
all currently executing Jobs in this Scheduler instance. |
IJobListener |
getInternalJobListener(String name)
Get the internal
that has the given name. |
com.helger.commons.collection.impl.ICommonsList<IJobListener> |
getInternalJobListeners()
Get a List containing all of the
s in the
Scheduler's internal list. |
com.helger.commons.collection.impl.ICommonsList<ISchedulerListener> |
getInternalSchedulerListeners()
Get a List containing all of the internal
s registered with the
Scheduler. |
ITriggerListener |
getInternalTriggerListener(String name)
Get the internal
that has the
given name. |
com.helger.commons.collection.impl.ICommonsList<ITriggerListener> |
getInternalTriggerListeners()
Get a list containing all of the
s in the
Scheduler's internal list. |
IJobDetail |
getJobDetail(JobKey jobKey)
Get the
for the Job instance
with the given name and group. |
IJobFactory |
getJobFactory() |
com.helger.commons.collection.impl.ICommonsList<String> |
getJobGroupNames()
Get the names of all known
groups. |
com.helger.commons.collection.impl.ICommonsSet<JobKey> |
getJobKeys(GroupMatcher<JobKey> matcher)
Get the names of all the
in
the matching groups. |
Class<?> |
getJobStoreClass() |
IListenerManager |
getListenerManager() |
com.helger.commons.collection.impl.ICommonsSet<String> |
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. |
ISchedulerSignaler |
getSchedulerSignaler() |
ThreadGroup |
getSchedulerThreadGroup()
Returns the name of the thread group for Quartz's main threads.
|
Class<?> |
getThreadPoolClass() |
int |
getThreadPoolSize() |
ITrigger |
getTrigger(TriggerKey triggerKey)
Get the
instance with the given name and
group. |
com.helger.commons.collection.impl.ICommonsList<String> |
getTriggerGroupNames()
Get the names of all known
groups. |
com.helger.commons.collection.impl.ICommonsSet<TriggerKey> |
getTriggerKeys(GroupMatcher<TriggerKey> matcher)
Get the names of all the
in the matching groups. |
com.helger.commons.collection.impl.ICommonsList<? extends ITrigger> |
getTriggersOfJob(JobKey jobKey)
Get all
s that are associated with the
identified . |
ITrigger.ETriggerState |
getTriggerState(TriggerKey triggerKey)
Get the current state of the identified
. |
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 |
interrupt(String fireInstanceId)
Interrupt 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(IJobExecutionContext jec) |
void |
notifyJobListenersWasExecuted(IJobExecutionContext jec,
JobExecutionException je) |
void |
notifyJobListenersWasVetoed(IJobExecutionContext jec) |
protected void |
notifyJobStoreJobComplete(IOperableTrigger trigger,
IJobDetail detail,
ITrigger.ECompletedExecutionInstruction instCode) |
protected void |
notifyJobStoreJobVetoed(IOperableTrigger trigger,
IJobDetail detail,
ITrigger.ECompletedExecutionInstruction instCode) |
void |
notifySchedulerListenersError(String msg,
SchedulerException se) |
void |
notifySchedulerListenersFinalized(ITrigger trigger) |
void |
notifySchedulerListenersInStandbyMode() |
void |
notifySchedulerListenersJobAdded(IJobDetail 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(ITrigger trigger) |
void |
notifySchedulerListenersShutdown() |
void |
notifySchedulerListenersShuttingdown() |
void |
notifySchedulerListenersStarted() |
void |
notifySchedulerListenersStarting() |
void |
notifySchedulerListenersUnscheduled(TriggerKey triggerKey) |
protected void |
notifySchedulerThread(long candidateNewNextFireTime) |
void |
notifyTriggerListenersComplete(IJobExecutionContext jec,
ITrigger.ECompletedExecutionInstruction instCode) |
boolean |
notifyTriggerListenersFired(IJobExecutionContext jec) |
void |
notifyTriggerListenersMisfired(ITrigger trigger) |
int |
numJobsExecuted() |
void |
pauseAll()
Pause all triggers - equivalent of calling
pauseTriggers(GroupMatcher<TriggerKey>) with a matcher
matching all known groups. |
void |
pauseJob(JobKey jobKey)
Pause the
with the given
name - by pausing all of its current Triggers. |
void |
pauseJobs(GroupMatcher<JobKey> groupMatcher)
Pause all of the
in the
matching groups - by pausing all of their Triggers. |
void |
pauseTrigger(TriggerKey triggerKey)
Pause the
with the given name. |
void |
pauseTriggers(GroupMatcher<TriggerKey> matcher)
Pause all of the
in the matching groups. |
boolean |
removeInternalJobListener(String name)
Remove the identified
from the
Scheduler's list of internal listeners. |
boolean |
removeInternalSchedulerListener(ISchedulerListener schedulerListener)
Remove the given
from the
Scheduler's list of internal listeners. |
boolean |
removeinternalTriggerListener(String name)
Remove the identified
from the
Scheduler's list of internal listeners. |
boolean |
removeNoGCObject(Object obj) |
Date |
rescheduleJob(TriggerKey triggerKey,
ITrigger newTrigger)
Remove (delete) the
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
with the given name. |
void |
resumeJobs(GroupMatcher<JobKey> matcher)
Resume (un-pause) all of the
in the matching groups. |
void |
resumeTrigger(TriggerKey triggerKey)
Resume (un-pause) the
with the given name. |
void |
resumeTriggers(GroupMatcher<TriggerKey> matcher)
Resume (un-pause) all of the
in the matching
groups. |
Date |
runningSince() |
Date |
scheduleJob(IJobDetail jobDetail,
ITrigger trigger)
Add the
identified by the given
to the Scheduler, and
associate the given with
it. |
void |
scheduleJob(IJobDetail jobDetail,
Set<? extends ITrigger> triggersForJob,
boolean replace) |
Date |
scheduleJob(ITrigger trigger)
|
void |
scheduleJobs(Map<IJobDetail,Set<? extends ITrigger>> triggersAndJobs,
boolean replace) |
void |
setJobFactory(IJobFactory aFactory) |
void |
setSignalOnSchedulingChange(boolean signalOnSchedulingChange) |
void |
shutdown()
Halts the
QuartzScheduler's firing of
, and cleans up all
resources associated with the QuartzScheduler. |
void |
shutdown(boolean waitForJobsToComplete)
Halts the
QuartzScheduler's firing of
, and cleans up all
resources associated with the QuartzScheduler. |
void |
standby()
Temporarily halts the
QuartzScheduler's firing of
. |
void |
start()
Starts the
QuartzScheduler's threads that fire
. |
void |
startDelayed(int seconds) |
boolean |
supportsPersistence() |
void |
triggerJob(IOperableTrigger trig)
Store and schedule the identified
|
void |
triggerJob(JobKey jobKey,
JobDataMap data)
Trigger the identified
(execute
it now) - with a non-volatile trigger. |
boolean |
unscheduleJob(TriggerKey triggerKey)
Remove the indicated
from
the scheduler. |
boolean |
unscheduleJobs(List<TriggerKey> triggerKeys) |
void |
validateState() |
public QuartzScheduler(QuartzSchedulerResources resources, long idleWaitTime) throws SchedulerException
QuartzScheduler with the given configuration
properties.SchedulerException - On errorQuartzSchedulerResourcespublic void initialize()
throws SchedulerException
SchedulerException - on errorpublic String getVersion()
getVersion in interface IQuartzSchedulerpublic static String getVersionMajor()
public static String getVersionMinor()
public static String getVersionIteration()
public ISchedulerSignaler getSchedulerSignaler()
public String getSchedulerName()
Returns the name of the QuartzScheduler.
getSchedulerName in interface IQuartzSchedulerpublic String getSchedulerInstanceId()
Returns the instance Id of the QuartzScheduler.
getSchedulerInstanceId in interface IQuartzSchedulerpublic ThreadGroup getSchedulerThreadGroup()
Returns the name of the thread group for Quartz's main threads.
public void addNoGCObject(Object obj)
public boolean removeNoGCObject(Object obj)
public SchedulerContext getSchedulerContext() throws SchedulerException
Returns the SchedulerContext of the Scheduler.
getSchedulerContext in interface IQuartzSchedulerSchedulerExceptionpublic boolean isSignalOnSchedulingChange()
public void setSignalOnSchedulingChange(boolean signalOnSchedulingChange)
public void start()
throws SchedulerException
Starts the QuartzScheduler's threads that fire
.
ITriggers
All that have misfired
will be passed to the appropriate TriggerListener(s).
ITriggers
start in interface IQuartzSchedulerSchedulerExceptionpublic void startDelayed(int seconds)
throws SchedulerException
startDelayed in interface IQuartzSchedulerSchedulerExceptionpublic void standby()
Temporarily halts the QuartzScheduler's firing of
.
ITriggers
The scheduler is not destroyed, and can be re-started at any time.
standby in interface IQuartzSchedulerpublic boolean isInStandbyMode()
Reports whether the Scheduler is paused.
isInStandbyMode in interface IQuartzSchedulerpublic Date runningSince()
runningSince in interface IQuartzSchedulerpublic int numJobsExecuted()
numJobsExecuted in interface IQuartzSchedulerpublic Class<?> getJobStoreClass()
getJobStoreClass in interface IQuartzSchedulerpublic boolean supportsPersistence()
supportsPersistence in interface IQuartzSchedulerpublic boolean isClustered()
isClustered in interface IQuartzSchedulerpublic Class<?> getThreadPoolClass()
getThreadPoolClass in interface IQuartzSchedulerpublic int getThreadPoolSize()
getThreadPoolSize in interface IQuartzSchedulerpublic void shutdown()
Halts the QuartzScheduler's firing of
, and cleans up all
resources associated with the QuartzScheduler. Equivalent to
ITriggersshutdown(false).
The scheduler cannot be re-started.
shutdown in interface IQuartzSchedulerpublic void shutdown(boolean waitForJobsToComplete)
Halts the QuartzScheduler's firing of
, and cleans up all
resources associated with the QuartzScheduler.
ITriggers
The scheduler cannot be re-started.
shutdown in interface IQuartzSchedulerwaitForJobsToComplete - if true the scheduler will not allow this method to
return until all currently executing jobs have completed.public boolean isShutdown()
Reports whether the Scheduler has been shutdown.
isShutdown in interface IQuartzSchedulerpublic boolean isShuttingDown()
public boolean isStarted()
public void validateState()
throws SchedulerException
SchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsList<IJobExecutionContext> 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.
getCurrentlyExecutingJobs in interface IQuartzSchedulerpublic Date scheduleJob(IJobDetail jobDetail, ITrigger trigger) throws SchedulerException
Add the identified by the given
IJob to the Scheduler, and
associate the given IJobDetail with
it.
ITrigger
If the given Trigger does not reference any Job, then it will
be set to reference the Job passed with it into this method.
scheduleJob in interface IQuartzSchedulerSchedulerException - if the Job or Trigger cannot be added to the Scheduler, or there is
an internal Scheduler error.public Date scheduleJob(ITrigger trigger) throws SchedulerException
Schedule the given with the
ITriggerJob identified by the Trigger's settings.
scheduleJob in interface IQuartzSchedulerSchedulerException - if the indicated Job does not exist, or the Trigger cannot be added
to the Scheduler, or there is an internal Scheduler error.public void addJob(IJobDetail jobDetail, boolean replace) throws SchedulerException
Add the given Job to the Scheduler - with no associated
Trigger. The Job will be 'dormant' until it is
scheduled with a Trigger, or
Scheduler.triggerJob() is called for it.
The Job must by definition be 'durable', if it is not,
SchedulerException will be thrown.
addJob in interface IQuartzSchedulerSchedulerException - if there is an internal Scheduler error, or if the Job is not
durable, or a Job with the same name already exists, and
replace is false.public void addJob(IJobDetail jobDetail, boolean replace, boolean storeNonDurableWhileAwaitingScheduling) throws SchedulerException
addJob in interface IQuartzSchedulerSchedulerExceptionpublic boolean deleteJob(JobKey jobKey) throws SchedulerException
Delete the identified Job from the Scheduler - and any
associated Triggers.
deleteJob in interface IQuartzSchedulerSchedulerException - if there is an internal Scheduler error.public boolean deleteJobs(List<JobKey> jobKeys) throws SchedulerException
deleteJobs in interface IQuartzSchedulerSchedulerExceptionpublic void scheduleJobs(Map<IJobDetail,Set<? extends ITrigger>> triggersAndJobs, boolean replace) throws SchedulerException
scheduleJobs in interface IQuartzSchedulerSchedulerExceptionpublic void scheduleJob(IJobDetail jobDetail, Set<? extends ITrigger> triggersForJob, boolean replace) throws SchedulerException
scheduleJob in interface IQuartzSchedulerSchedulerExceptionpublic boolean unscheduleJobs(List<TriggerKey> triggerKeys) throws SchedulerException
unscheduleJobs in interface IQuartzSchedulerSchedulerExceptionpublic boolean unscheduleJob(TriggerKey triggerKey) throws SchedulerException
Remove the indicated from
the scheduler.
ITrigger
unscheduleJob in interface IQuartzSchedulerSchedulerExceptionpublic Date rescheduleJob(TriggerKey triggerKey, ITrigger newTrigger) throws SchedulerException
Remove (delete) the with
the given name, and store the new given one - which must be associated with
the same job.
ITrigger
rescheduleJob in interface IQuartzSchedulernewTrigger - The new Trigger to be stored.null if a Trigger with the given name
& group was not found and removed from the store, otherwise the
first fire time of the newly scheduled trigger.SchedulerExceptionpublic void triggerJob(JobKey jobKey, JobDataMap data) throws SchedulerException
Trigger the identified (execute
it now) - with a non-volatile trigger.
IJob
triggerJob in interface IQuartzSchedulerSchedulerExceptionpublic void triggerJob(IOperableTrigger trig) throws SchedulerException
Store and schedule the identified
IOperableTrigger
triggerJob in interface IQuartzSchedulerSchedulerExceptionpublic void pauseTrigger(TriggerKey triggerKey) throws SchedulerException
Pause the with the given name.
ITrigger
pauseTrigger in interface IQuartzSchedulerSchedulerExceptionpublic void pauseTriggers(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Pause all of the in the matching groups.
ITriggers
pauseTriggers in interface IQuartzSchedulerSchedulerExceptionpublic void pauseJob(JobKey jobKey) throws SchedulerException
Pause the with the given
name - by pausing all of its current IJobDetailTriggers.
pauseJob in interface IQuartzSchedulerSchedulerExceptionpublic void pauseJobs(GroupMatcher<JobKey> groupMatcher) throws SchedulerException
Pause all of the in the
matching groups - by pausing all of their IJobDetailsTriggers.
pauseJobs in interface IQuartzSchedulerSchedulerExceptionpublic void resumeTrigger(TriggerKey triggerKey) throws SchedulerException
Resume (un-pause) the with the given name.
ITrigger
If the Trigger missed one or more fire-times, then the
Trigger's misfire instruction will be applied.
resumeTrigger in interface IQuartzSchedulerSchedulerExceptionpublic void resumeTriggers(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Resume (un-pause) all of the in the matching
groups.
ITriggers
If any Trigger missed one or more fire-times, then the
Trigger's misfire instruction will be applied.
resumeTriggers in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsSet<String> getPausedTriggerGroups() throws SchedulerException
getPausedTriggerGroups in interface IQuartzSchedulerSchedulerExceptionpublic void resumeJob(JobKey jobKey) throws SchedulerException
Resume (un-pause) the
with the given name.
IJobDetail
If any of the Job'sTrigger s missed one or more
fire-times, then the Trigger's misfire instruction will be
applied.
resumeJob in interface IQuartzSchedulerSchedulerExceptionpublic void resumeJobs(GroupMatcher<JobKey> matcher) throws SchedulerException
Resume (un-pause) all of the
in the matching groups.
IJobDetails
If any of the Job s had Trigger s that missed one
or more fire-times, then the Trigger's misfire instruction
will be applied.
resumeJobs in interface IQuartzSchedulerSchedulerExceptionpublic void pauseAll()
throws SchedulerException
Pause all triggers - equivalent of calling
pauseTriggers(GroupMatcher<TriggerKey>) with a matcher
matching all known groups.
When resumeAll() is called (to un-pause), trigger misfire
instructions WILL be applied.
pauseAll in interface IQuartzSchedulerSchedulerExceptionresumeAll(),
pauseTriggers(GroupMatcher),
standby()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 the
Trigger's misfire instruction will be applied.
resumeAll in interface IQuartzSchedulerSchedulerExceptionpauseAll()public com.helger.commons.collection.impl.ICommonsList<String> getJobGroupNames() throws SchedulerException
Get the names of all known
groups.
IJob
getJobGroupNames in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsSet<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) throws SchedulerException
Get the names of all the in
the matching groups.
IJobs
getJobKeys in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsList<? extends ITrigger> getTriggersOfJob(JobKey jobKey) throws SchedulerException
Get all s that are associated with the
identified ITrigger.
IJobDetail
getTriggersOfJob in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsList<String> getTriggerGroupNames() throws SchedulerException
Get the names of all known
groups.
ITrigger
getTriggerGroupNames in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsSet<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws SchedulerException
Get the names of all the
in the matching groups.
ITriggers
getTriggerKeys in interface IQuartzSchedulerSchedulerExceptionpublic IJobDetail getJobDetail(JobKey jobKey) throws SchedulerException
Get the for the IJobDetailJob instance
with the given name and group.
getJobDetail in interface IQuartzSchedulerSchedulerExceptionpublic ITrigger getTrigger(TriggerKey triggerKey) throws SchedulerException
Get the instance with the given name and
group.
ITrigger
getTrigger in interface IQuartzSchedulerSchedulerExceptionpublic boolean checkExists(JobKey jobKey) throws SchedulerException
IJob with the given identifier already exists
within the scheduler.checkExists in interface IQuartzSchedulerjobKey - the identifier to check forSchedulerException - on errorpublic boolean checkExists(TriggerKey triggerKey) throws SchedulerException
ITrigger with the given identifier already
exists within the scheduler.checkExists in interface IQuartzSchedulertriggerKey - the identifier to check forSchedulerException - on errorpublic void clear()
throws SchedulerException
clear in interface IQuartzSchedulerSchedulerException - on errorpublic ITrigger.ETriggerState getTriggerState(TriggerKey triggerKey) throws SchedulerException
Get the current state of the identified .
ITrigger
getTriggerState in interface IQuartzSchedulerSchedulerExceptionITrigger.ETriggerStatepublic void addCalendar(String calName, ICalendar calendar, boolean replace, boolean updateTriggers) throws SchedulerException
Add (register) the given Calendar to the Scheduler.
addCalendar in interface IQuartzSchedulerSchedulerException - if there is an internal Scheduler error, or a Calendar with the
same name already exists, and replace is
false.public boolean deleteCalendar(String calName) throws SchedulerException
Delete the identified Calendar from the Scheduler.
deleteCalendar in interface IQuartzSchedulerSchedulerException - if there is an internal Scheduler error.public ICalendar getCalendar(String calName) throws SchedulerException
Get the instance with the given name.
ICalendar
getCalendar in interface IQuartzSchedulerSchedulerExceptionpublic com.helger.commons.collection.impl.ICommonsList<String> getCalendarNames() throws SchedulerException
Get the names of all registered .
ICalendars
getCalendarNames in interface IQuartzSchedulerSchedulerException@Nonnull public IListenerManager getListenerManager()
public void addInternalJobListener(IJobListener jobListener)
Add the given to the
IJobListenerScheduler's internal list.
public boolean removeInternalJobListener(String name)
Remove the identified from the
IJobListenerScheduler's list of internal listeners.
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IJobListener> getInternalJobListeners()
Get a List containing all of the
s in the
IJobListenerScheduler's internal list.
@Nullable public IJobListener getInternalJobListener(String name)
Get the internal
that has the given name.
IJobListener
public void addInternalTriggerListener(ITriggerListener triggerListener)
Add the given to
the ITriggerListenerScheduler's internal list.
public boolean removeinternalTriggerListener(String name)
Remove the identified from the
ITriggerListenerScheduler's list of internal listeners.
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<ITriggerListener> getInternalTriggerListeners()
Get a list containing all of the
s in the
ITriggerListenerScheduler's internal list.
@Nullable public ITriggerListener getInternalTriggerListener(String name)
Get the internal that has the
given name.
ITriggerListener
public void addInternalSchedulerListener(ISchedulerListener schedulerListener)
Register the given with the
ISchedulerListenerScheduler's list of internal listeners.
public boolean removeInternalSchedulerListener(ISchedulerListener schedulerListener)
Remove the given from the
ISchedulerListenerScheduler's list of internal listeners.
public com.helger.commons.collection.impl.ICommonsList<ISchedulerListener> getInternalSchedulerListeners()
Get a List containing all of the internal
s registered with the
ISchedulerListenerScheduler.
protected void notifyJobStoreJobComplete(IOperableTrigger trigger, IJobDetail detail, ITrigger.ECompletedExecutionInstruction instCode)
protected void notifyJobStoreJobVetoed(IOperableTrigger trigger, IJobDetail detail, ITrigger.ECompletedExecutionInstruction instCode)
protected void notifySchedulerThread(long candidateNewNextFireTime)
public boolean notifyTriggerListenersFired(IJobExecutionContext jec) throws SchedulerException
SchedulerExceptionpublic void notifyTriggerListenersMisfired(ITrigger trigger) throws SchedulerException
SchedulerExceptionpublic void notifyTriggerListenersComplete(IJobExecutionContext jec, ITrigger.ECompletedExecutionInstruction instCode) throws SchedulerException
SchedulerExceptionpublic void notifyJobListenersToBeExecuted(IJobExecutionContext jec) throws SchedulerException
SchedulerExceptionpublic void notifyJobListenersWasVetoed(IJobExecutionContext jec) throws SchedulerException
SchedulerExceptionpublic void notifyJobListenersWasExecuted(IJobExecutionContext jec, JobExecutionException je) throws SchedulerException
SchedulerExceptionpublic void notifySchedulerListenersError(String msg, SchedulerException se)
public void notifySchedulerListenersSchduled(ITrigger trigger)
public void notifySchedulerListenersUnscheduled(TriggerKey triggerKey)
public void notifySchedulerListenersFinalized(ITrigger trigger)
public void notifySchedulerListenersPausedTrigger(TriggerKey triggerKey)
public void notifySchedulerListenersPausedTriggers(String group)
public void notifySchedulerListenersResumedTrigger(TriggerKey key)
public void notifySchedulerListenersResumedTriggers(String group)
public void notifySchedulerListenersPausedJob(JobKey key)
public void notifySchedulerListenersPausedJobs(String group)
public void notifySchedulerListenersResumedJob(JobKey key)
public void notifySchedulerListenersResumedJobs(String group)
public void notifySchedulerListenersInStandbyMode()
public void notifySchedulerListenersStarted()
public void notifySchedulerListenersStarting()
public void notifySchedulerListenersShutdown()
public void notifySchedulerListenersShuttingdown()
public void notifySchedulerListenersJobAdded(IJobDetail jobDetail)
public void notifySchedulerListenersJobDeleted(JobKey jobKey)
public void setJobFactory(IJobFactory aFactory) throws SchedulerException
aFactory - Factory. May not be nullSchedulerException - on errorpublic IJobFactory getJobFactory()
public boolean interrupt(JobKey jobKey) throws UnableToInterruptJobException
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.
interrupt in interface IQuartzSchedulerUnableToInterruptJobExceptionIQuartzScheduler.interrupt(JobKey)public boolean interrupt(String fireInstanceId) throws UnableToInterruptJobException
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.
interrupt in interface IQuartzSchedulerUnableToInterruptJobExceptionIQuartzScheduler.interrupt(JobKey)Copyright © 2016–2021 Philip Helger. All rights reserved.