调度程序的standby()和pauseAll()有什么区别?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
区别在于触发失火指令应用行为。
当您在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.
在 待机 和 pauseAll。
我在 API 文档的以下描述中用粗体进行了区分。
待机:
全部暂停:
There is difference when scheduler is resumed after standby and pauseAll.
I have made difference in bold in following description from API docs.
standby :
pauseAll :
以下是我从源代码 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 callpauseTriggerGroup()
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 withpauseJob()
orpauseJobGroup()
, it's just about what happening on triggers and their groups.resumeAll()
is similar to callresumeTriggerGroup()
on every now existing trigger groups. In addition, misfires will be applied during execution ofresumeAll()
.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.
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, afterpauseAll()
it will be scheduled and run appropriately, but in case ofstandby()
it runs not earlier than a 'start()' method will be called on a scheduler.