开发者

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 t开发者_开发知识库riggers that occur before the completion of the execute(xx) method will be delayed? 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.

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).

You can implement a TriggerListener to be notified of misfires, but there is no event simply for a trigger being blocked from execution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜