📄 scheduler.java
字号:
*/
Trigger[] getTriggersOfJob(String jobName, String groupName)
throws SchedulerException;
/**
* <p>
* Get the names of all known <code>{@link Trigger}</code> groups.
* </p>
*/
String[] getTriggerGroupNames() throws SchedulerException;
/**
* <p>
* Get the names of all the <code>{@link Trigger}s</code> in the given
* group.
* </p>
*/
String[] getTriggerNames(String groupName) throws SchedulerException;
/**
* <p>
* Get the names of all <code>{@link Trigger}</code> groups that are paused.
* </p>
*/
Set getPausedTriggerGroups() throws SchedulerException;
/**
* <p>
* Get the <code>{@link JobDetail}</code> for the <code>Job</code>
* instance with the given name and group.
* </p>
*/
JobDetail getJobDetail(String jobName, String jobGroup)
throws SchedulerException;
/**
* <p>
* Get the <code>{@link Trigger}</code> instance with the given name and
* group.
* </p>
*/
Trigger getTrigger(String triggerName, String triggerGroup)
throws SchedulerException;
/**
* <p>
* Get the current state of the identified <code>{@link Trigger}</code>.
* </p>
*
* @see Trigger#STATE_NORMAL
* @see Trigger#STATE_PAUSED
* @see Trigger#STATE_COMPLETE
* @see Trigger#STATE_ERROR
* @see Trigger#STATE_BLOCKED
* @see Trigger#STATE_NONE
*/
int getTriggerState(String triggerName, String triggerGroup)
throws SchedulerException;
/**
* <p>
* Add (register) the given <code>Calendar</code> to the Scheduler.
* </p>
*
* @param updateTriggers whether or not to update existing triggers that
* referenced the already existing calendar so that they are 'correct'
* based on the new trigger.
*
*
* @throws SchedulerException
* if there is an internal Scheduler error, or a Calendar with
* the same name already exists, and <code>replace</code> is
* <code>false</code>.
*/
void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers)
throws SchedulerException;
/**
* <p>
* Delete the identified <code>Calendar</code> from the Scheduler.
* </p>
*
* @return true if the Calendar was found and deleted.
* @throws SchedulerException
* if there is an internal Scheduler error.
*/
boolean deleteCalendar(String calName) throws SchedulerException;
/**
* <p>
* Get the <code>{@link Calendar}</code> instance with the given name.
* </p>
*/
Calendar getCalendar(String calName) throws SchedulerException;
/**
* <p>
* Get the names of all registered <code>{@link Calendar}s</code>.
* </p>
*/
String[] getCalendarNames() throws SchedulerException;
/**
* <p>
* Request the interruption, within this Scheduler instance, of all
* currently executing instances of the identified <code>Job</code>, which
* must be an implementor of the <code>InterruptableJob</code> interface.
* </p>
*
* <p>
* If more than one instance of the identified job is currently executing,
* the <code>InterruptableJob#interrupt()</code> method will be called on
* each instance. However, there is a limitation that in the case that
* <code>interrupt()</code> on one instances throws an exception, all
* remaining instances (that have not yet been interrupted) will not have
* their <code>interrupt()</code> method called.
* </p>
*
* <p>
* If you wish to interrupt a specific instance of a job (when more than
* one is executing) you can do so by calling
* <code>{@link #getCurrentlyExecutingJobs()}</code> to obtain a handle
* to the job instance, and then invoke <code>interrupt()</code> on it
* yourself.
* </p>
*
* <p>
* 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.
* </p>
*
* @param jobName
* @param groupName
* @return true is at least one instance of the identified job was found
* and interrupted.
* @throws UnableToInterruptJobException if the job does not implement
* <code>InterruptableJob</code>, or there is an exception while
* interrupting the job.
* @see InterruptableJob#interrupt()
* @see #getCurrentlyExecutingJobs()
*/
boolean interrupt(String jobName, String groupName) throws UnableToInterruptJobException;
///////////////////////////////////////////////////////////////////////////
///
/// Listener-related Methods
///
///////////////////////////////////////////////////////////////////////////
/**
* <p>
* Add the given <code>{@link JobListener}</code> to the <code>Scheduler</code>'s
* <i>global</i> list.
* </p>
*
* <p>
* Listeners in the 'global' list receive notification of execution events
* for ALL <code>{@link org.quartz.JobDetail}</code>s.
* </p>
*/
void addGlobalJobListener(JobListener jobListener)
throws SchedulerException;
/**
* <p>
* Add the given <code>{@link JobListener}</code> to the <code>Scheduler</code>'s
* list, of registered <code>JobListener</code>s.
*/
void addJobListener(JobListener jobListener)
throws SchedulerException;
/**
* <p>
* Remove the given <code>{@link JobListener}</code> from the <code>Scheduler</code>'s
* list of <i>global</i> listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*
* @deprecated Use <code>{@link #removeGlobalJobListener(String)}</code>
*/
boolean removeGlobalJobListener(JobListener jobListener)
throws SchedulerException;
/**
* <p>
* Remove the identifed <code>{@link JobListener}</code> from the <code>Scheduler</code>'s
* list of <i>global</i> listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*/
boolean removeGlobalJobListener(String name)
throws SchedulerException;
/**
* <p>
* Remove the identifed <code>{@link JobListener}</code> from the <code>Scheduler</code>'s
* list of registered listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*/
boolean removeJobListener(String name) throws SchedulerException;
/**
* <p>
* Get a List containing all of the <code>{@link JobListener}</code> s in
* the <code>Scheduler</code>'s<i>global</i> list.
* </p>
*/
List getGlobalJobListeners() throws SchedulerException;
/**
* <p>
* Get a Set containing the names of all the <i>non-global</i><code>{@link JobListener}</code>
* s registered with the <code>Scheduler</code>.
* </p>
*/
Set getJobListenerNames() throws SchedulerException;
/**
* <p>
* Get the <i>global</i><code>{@link JobListener}</code> that has
* the given name.
* </p>
*/
JobListener getGlobalJobListener(String name) throws SchedulerException;
/**
* <p>
* Get the <i>non-global</i><code>{@link JobListener}</code> that has
* the given name.
* </p>
*/
JobListener getJobListener(String name) throws SchedulerException;
/**
* <p>
* Add the given <code>{@link TriggerListener}</code> to the <code>Scheduler</code>'s
* <i>global</i> list.
* </p>
*
* <p>
* Listeners in the 'global' list receive notification of execution events
* for ALL <code>{@link Trigger}</code>s.
* </p>
*/
void addGlobalTriggerListener(TriggerListener triggerListener)
throws SchedulerException;
/**
* <p>
* Add the given <code>{@link TriggerListener}</code> to the <code>Scheduler</code>'s
* list, of registered <code>TriggerListener</code>s.
*/
void addTriggerListener(TriggerListener triggerListener)
throws SchedulerException;
/**
* <p>
* Remove the given <code>{@link TriggerListener}</code> from the <code>Scheduler</code>'s
* list of <i>global</i> listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*
* @deprecated Use <code>{@link #removeGlobalTriggerListener(String)}</code>
*/
boolean removeGlobalTriggerListener(TriggerListener triggerListener)
throws SchedulerException;
/**
* <p>
* Remove the identifed <code>{@link TriggerListener}</code> from the <code>Scheduler</code>'s
* list of <i>global</i> listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*/
boolean removeGlobalTriggerListener(String name)
throws SchedulerException;
/**
* <p>
* Remove the identifed <code>{@link TriggerListener}</code> from the
* <code>Scheduler</code>'s list of registered listeners.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*/
boolean removeTriggerListener(String name) throws SchedulerException;
/**
* <p>
* Get a List containing all of the <code>{@link TriggerListener}</code>
* s in the <code>Scheduler</code>'s<i>global</i> list.
* </p>
*/
List getGlobalTriggerListeners() throws SchedulerException;
/**
* <p>
* Get a Set containing the names of all the <i>non-global</i><code>{@link TriggerListener}</code>
* s registered with the <code>Scheduler</code>.
* </p>
*/
Set getTriggerListenerNames() throws SchedulerException;
/**
* <p>
* Get the <i>global</i><code>{@link TriggerListener}</code> that
* has the given name.
* </p>
*/
TriggerListener getGlobalTriggerListener(String name)
throws SchedulerException;
/**
* <p>
* Get the <i>non-global</i><code>{@link TriggerListener}</code> that
* has the given name.
* </p>
*/
TriggerListener getTriggerListener(String name)
throws SchedulerException;
/**
* <p>
* Register the given <code>{@link SchedulerListener}</code> with the
* <code>Scheduler</code>.
* </p>
*/
void addSchedulerListener(SchedulerListener schedulerListener)
throws SchedulerException;
/**
* <p>
* Remove the given <code>{@link SchedulerListener}</code> from the
* <code>Scheduler</code>.
* </p>
*
* @return true if the identifed listener was found in the list, and
* removed.
*/
boolean removeSchedulerListener(SchedulerListener schedulerListener)
throws SchedulerException;
/**
* <p>
* Get a List containing all of the <code>{@link SchedulerListener}</code>
* s registered with the <code>Scheduler</code>.
* </p>
*/
List getSchedulerListeners() throws SchedulerException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -