scheduler.java
来自「Quartz 是个开源的作业调度框架」· Java 代码 · 共 978 行 · 第 1/3 页
JAVA
978 行
*/ public String[] getJobNames(String groupName) throws SchedulerException; /** * <p> * Get all <code>{@link Trigger}</code> s that are associated with the * identified <code>{@link org.quartz.JobDetail}</code>. * </p> */ public Trigger[] getTriggersOfJob(String jobName, String groupName) throws SchedulerException; /** * <p> * Get the names of all known <code>{@link Trigger}</code> groups. * </p> */ public String[] getTriggerGroupNames() throws SchedulerException; /** * <p> * Get the names of all the <code>{@link Trigger}s</code> in the given * group. * </p> */ public String[] getTriggerNames(String groupName) throws SchedulerException; /** * <p> * Get the names of all <code>{@link Trigger}</code> groups that are paused. * </p> * * @return * @throws SchedulerException */ public Set getPausedTriggerGroups() throws SchedulerException; /** * <p> * Get the <code>{@link JobDetail}</code> for the <code>Job</code> * instance with the given name and group. * </p> */ public JobDetail getJobDetail(String jobName, String jobGroup) throws SchedulerException; /** * <p> * Get the <code>{@link Trigger}</code> instance with the given name and * group. * </p> */ public 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 */ public 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>. */ public 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. */ public boolean deleteCalendar(String calName) throws SchedulerException; /** * <p> * Get the <code>{@link Calendar}</code> instance with the given name. * </p> */ public Calendar getCalendar(String calName) throws SchedulerException; /** * <p> * Get the names of all registered <code>{@link Calendar}s</code>. * </p> */ public String[] getCalendarNames() throws SchedulerException; /** * <p> * Request the interruption 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> * * @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() */ public 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> */ public 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. */ public 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. */ public boolean removeGlobalJobListener(JobListener jobListener) 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. */ public 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> */ public 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> */ public Set getJobListenerNames() throws SchedulerException; /** * <p> * Get the <i>non-global</i><code>{@link JobListener}</code> that has * the given name. * </p> */ public 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> */ public 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. */ public 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. */ public boolean removeGlobalTriggerListener(TriggerListener triggerListener) 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. */ public 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> */ public 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> */ public Set getTriggerListenerNames() throws SchedulerException; /** * <p> * Get the <i>non-global</i><code>{@link TriggerListener}</code> that * has the given name. * </p> */ public TriggerListener getTriggerListener(String name) throws SchedulerException; /** * <p> * Register the given <code>{@link SchedulerListener}</code> with the * <code>Scheduler</code>. * </p> */ public 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. */ public 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> */ public List getSchedulerListeners() throws SchedulerException;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?