⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scheduler.java

📁 定时器开源项目, 相对于 jcrontab, Quartz 算是更完整的一个项目, 随著开发的版本上来, 他已经脱离只是写在程序里面的计时器, 在指定的时间或区间, 处理所指定的事件. 也加入了 se
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     *      * @see #resumeTrigger(String, String)     */    public void pauseTrigger(String triggerName, String groupName)            throws SchedulerException;    /**     * <p>     * Pause all of the <code>{@link Trigger}s</code> in the given group.     * </p>     *      * <p>     * The Scheduler will "remember" that the group is paused, and impose the     * pause on any new triggers that are added to the group while the group is     * paused.     * </p>     *      * @see #resumeTriggerGroup(String)     */    public void pauseTriggerGroup(String groupName) throws SchedulerException;    /**     * <p>     * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with     * the given name.     * </p>     *      * <p>     * If any of the <code>Job</code>'s<code>Trigger</code> s missed one     * or more fire-times, then the <code>Trigger</code>'s misfire     * instruction will be applied.     * </p>     *      * @see #pauseJob(String, String)     */    public void resumeJob(String jobName, String groupName)            throws SchedulerException;    /**     * <p>     * Resume (un-pause) all of the <code>{@link org.quartz.JobDetail}s</code>     * in the given group.     * </p>     *      * <p>     * If any of the <code>Job</code> s had <code>Trigger</code> s that     * missed one or more fire-times, then the <code>Trigger</code>'s     * misfire instruction will be applied.     * </p>     *      * @see #pauseJobGroup(String)     */    public void resumeJobGroup(String groupName) throws SchedulerException;    /**     * <p>     * Resume (un-pause) the <code>{@link Trigger}</code> with the given     * name.     * </p>     *      * <p>     * If the <code>Trigger</code> missed one or more fire-times, then the     * <code>Trigger</code>'s misfire instruction will be applied.     * </p>     *      * @see #pauseTrigger(String, String)     */    public void resumeTrigger(String triggerName, String groupName)            throws SchedulerException;    /**     * <p>     * Resume (un-pause) all of the <code>{@link Trigger}s</code> in the     * given group.     * </p>     *      * <p>     * If any <code>Trigger</code> missed one or more fire-times, then the     * <code>Trigger</code>'s misfire instruction will be applied.     * </p>     *      * @see #pauseTriggerGroup(String)     */    public void resumeTriggerGroup(String groupName) throws SchedulerException;    /**     * <p>     * Pause all triggers - equivalent of calling <code>pauseTriggerGroup(group)</code>     * on every group.     * </p>     *      * <p>     * When <code>resumeAll()</code> is called (to un-pause), trigger misfire     * instructions WILL be applied.     * </p>     *      * @see #resumeAll()     * @see #pauseTriggerGroup(String)     * @see #pause()     */    public void pauseAll() throws SchedulerException;    /**     * <p>     * Resume (un-pause) all triggers - equivalent of calling <code>resumeTriggerGroup(group)</code>     * on every group.     * </p>     *      * <p>     * If any <code>Trigger</code> missed one or more fire-times, then the     * <code>Trigger</code>'s misfire instruction will be applied.     * </p>     *      * @see #pauseAll()     */    public void resumeAll() throws SchedulerException;    /**     * <p>     * Get the names of all known <code>{@link org.quartz.JobDetail}</code>     * groups.     * </p>     */    public String[] getJobGroupNames() throws SchedulerException;    /**     * <p>     * Get the names of all the <code>{@link org.quartz.JobDetail}s</code>     * in the given group.     * </p>     */    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;    ///////////////////////////////////////////////////////////////////////////    ///    /// 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;    /**     * <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;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -