调度程序的standby()和pauseAll()有什么区别?

发布于 2024-09-18 00:48:16 字数 775 浏览 13 评论 0原文

我正在使用 Quartz Scheduler v.1.8.0。

scheduler.standby 之间有什么区别()调度程序.pauseAll()

待机() - 暂时停止调度程序触发触发器。

pauseAll() - 暂停所有触发器 - 类似于呼叫 每隔一次暂停触发组(组) 然而,在使用这个之后 必须调用方法resumeAll() 清除调度程序的状态 “记住”所有新的触发因素 将在添加时暂停。

根据我从 API 文档中了解到的内容,我无法轻松/清楚地区分/区分它们中的每一个。我发现它们都具有相同的目的 - 暂时暂停/停止调度程序中的所有触发器,然后紧接着 start() (用于待机)或 resumeAll()< /em>(用于pauseAll)清除调度程序的状态。还有其他区别吗?

希望专家能帮助我理解任何细微的差异。

I'm using Quartz Scheduler v.1.8.0.

What's the difference between scheduler.standby() and scheduler.pauseAll()?

standby() -
Temporarily halts the Scheduler's firing of Triggers.

pauseAll() -
Pause all triggers - similar to calling
pauseTriggerGroup(group) on every
group, however, after using this
method resumeAll() must be called to
clear the scheduler's state of
'remembering' that all new triggers
will be paused as they are added.

Based on what I've understood from the API documentation, I'm not able to easily/clearly differentiate/distinguish from each one of them. I'm seeing both of them serving the same purpose - temporarily pause/halt all the triggers in the scheduler, and subsequently followed by a start() (for standby) or resumeAll() (for pauseAll) to clear the scheduler's state. Is there any other difference?

Hope experts can help me in understanding any subtle difference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

在你怀里撒娇 2024-09-25 00:48:16

区别在于触发失火指令应用行为。

当您在standby()之后调用start()时,待机时出现的任何失火都将被忽略。

当您在pauseAll()之后调用resumeAll()时,将应用调度程序暂停时出现的所有失火。

The difference is in trigger misfire instructions applying behavior.

When you call start() after standby(), any misfires, which appear while standby, will be ignored.

When you call resumeAll() after pauseAll(), all misfires, which appear while scheduler was paused, will be applyed.

冰之心 2024-09-25 00:48:16

待机pauseAll

我在 API 文档的以下描述中用粗体进行了区分。

待机

无效待机()
抛出 SchedulerException 暂时停止调度程序
触发触发器。

当调用 start() 时(将
调度程序退出待机模式),
触发失火指令不会
在执行期间应用
start() 方法 - 任何失火都会
之后立即检测到(由
JobStore的正常流程)。

调度程序没有被破坏,并且
可以随时重新启动。

全部暂停

无效暂停全部()
抛出 SchedulerException 暂停所有触发器
- 类似于在每个
然而,在使用这个之后
必须调用方法resumeAll()
清除调度程序的状态
“记住”所有新的触发因素
将在添加时暂停。

当调用resumeAll()时(
取消暂停),触发失火
将应用说明。

There is difference when scheduler is resumed after standby and pauseAll.

I have made difference in bold in following description from API docs.

standby :

void standby()
throws SchedulerException Temporarily halts the Scheduler's
firing of Triggers.

When start() is called (to bring the
scheduler out of stand-by mode),
trigger misfire instructions will NOT
be applied during the execution of the
start() method - any misfires will be
detected immediately afterward (by the
JobStore's normal process).

The scheduler is not destroyed, and
can be re-started at any time.

pauseAll :

void pauseAll()
throws SchedulerException Pause all triggers
- similar to calling pauseTriggerGroup(group) on every
group, however, after using this
method resumeAll() must be called to
clear the scheduler's state of
'remembering' that all new triggers
will be paused as they are added.

When resumeAll() is called (to
un-pause), trigger misfire
instructions WILL be applied.

梦情居士 2024-09-25 00:48:16

以下是我从源代码 v1.8.6 中得到的内容:

standby() 只是冻结调度程序线程,这意味着从现在开始不会再触发任何触发器,即使是以后添加的新触发器< /强>。

start() 只是恢复调度程序线程,不会立即应用失火策略。但所有的失火都会在以后自然地应用。

pauseAll() 类似于对每个现有触发器组调用 pauseTriggerGroup(),这意味着稍后添加的新触发器组将正常触发。请注意,与 pauseJob()pauseJobGroup() 无关,它只是与触发器及其组上发生的情况有关。

resumeAll() 类似于对每个现有的触发器组调用 resumeTriggerGroup()。此外,在执行 resumeAll() 期间将应用失火。

Here are what I got from source code v1.8.6:

standby() simply freezes the scheduler thread, which means no more trigger will be fired from now on, even those new triggers added later.

start() just resume the scheduler thread, and will not apply misfire policies immediately. But all misfires will be applied later naturally.

pauseAll() is similar to call pauseTriggerGroup() on every now existing trigger groups, which means those new trigger groups added later will be fired normally. And please notice that there is nothing to do with pauseJob() or pauseJobGroup(), it's just about what happening on triggers and their groups.

resumeAll() is similar to call resumeTriggerGroup() on every now existing trigger groups. In addition, misfires will be applied during execution of resumeAll().

孤独陪着我 2024-09-25 00:48:16

start() 和standby() 是每个实例的方法。以集群模式运行的其他实例将继续触发作业。

resumeAll()和pauseAll()适用于整个集群。

start() and standby() are per-instance methods. Other instances running in clustered mode will continue to trigger jobs.

resumeAll() and pauseAll() is applicable to the whole cluster.

国粹 2024-09-25 00:48:16

pauseAll() 暂停所有调度(在那一刻已经创建),standby() 暂停调度程序本身 。因此,当您创建新计划时,在 pauseAll() 之后,它将被适当地安排并运行,但在 standby() 的情况下,它的运行时间不会早于 'start( )' 方法将在调度程序上调用。

While pauseAll() pauses all schedules (already created by that moment), standby() pauses a scheduler itself. Thus when you create a new schedule, after pauseAll() it will be scheduled and run appropriately, but in case of standby() it runs not earlier than a 'start()' method will be called on a scheduler.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文