简体   繁体   English

实施StatefulJob时,“延迟”是什么意思?

[英]what does “delay” mean when implementing StatefulJob?

i already know that when using quartz and we dont want concurrent jobs, we need to implement the StatefulJob and the jobs wont run simultaneously but i wanna know what does it mean that new triggers that occur before the completion of the execute(xx) method will be delayed? 我已经知道,在使用石英时,我们不希望并发作业,我们需要实现StatefulJob,并且作业不会同时运行,但我想知道在execute(xx)方法完成之前发生的新触发器将意味着什么?被推迟? does it mean that once the job is completed, the one that is delayed is fired immediately or it will just be skipped and waiting for the next trigger? 这是否意味着一旦完成工作,被延迟的工作将立即被解雇,否则将被跳过并等待下一个触发器? also i want to keep a record for each trigger that is not fired because it was already running, so does quartz tell me this information in some way? 我也想为未触发的每个触发器保留一个记录,因为它已经在运行,所以石英是否以某种方式告诉我此信息?

"Delayed" means that Quartz won't select the trigger for firing even though its next fire time has arrived. “延迟”表示即使下一个触发时间到了,Quartz也不会选择触发触发器。

Once the running job instance completes, the trigger will again be candidate for firing, and if the next fire time has arrived (or past) it will be fired. 运行中的作业实例完成后,触发器将再次成为触发对象,并且如果下一个触发时间到来(或过去),则将触发该触发器。

The caveat to this is that the blocked trigger is subject to misfire handling. 需要注意的是,被阻止的触发器可能会发生误发处理。 If it is blocked for more time than your configured misfire threshold (defaults to 1 minute) then the trigger's misfire instruction will be applied, which depending upon which you selected for that trigger, may cause a skip in the trigger's firings, or may cause a rapid repeat (attempting to catch up). 如果被阻止的时间超过您配置的失火阈值(默认为1分钟)的时间,则将应用触发器的失火指令,具体取决于您为该触发器选择的触发器,可能会导致触发器的触发跳越,或者可能导致触发快速重复(试图赶上)。

You can implement a TriggerListener to be notified of misfires, but there is no event simply for a trigger being blocked from execution. 您可以实现一个TriggerListener来通知失火,但是没有简单地阻止触发器执行的事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM