本文介绍了石英作业详细要求恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JobDetail.requestsRecovery属性的文档规定以下内容

The documentation for JobDetail.requestsRecovery property states the following

现在,什么是恢复"情况或故障转移"情况?

Now, what is a 'recovery' situation or a 'fail-over' situation?

它们有何不同?

仅在JVM在作业执行过程中崩溃时才进行恢复吗,还是在作业由于异常而执行失败时才进行恢复?

Does the recovery happen only if the JVM crashes during job execution or does it happen if the job execution fails because of an exception also?

推荐答案

"恢复情况"是通用术语,一种恢复情况是"故障转移".

A "Recovery situation" is the generic term, one kind of recovery situation is the "fail-over".

故障转移是通常与冗余(例如群集)一起使用的容错系统所使用的过程.在集群中使用Quartz时会使用故障转移,并且 more Quartz的节点"存在.

A fail-over is a process used by fault-tolerance systems generally used with redundancy (e.g. clustering). Quartz use fail-over when is used in clustering and more Quartz "nodes" exists.

引用文档:

恢复情况是会导致硬关机"(即崩溃中正在运行的进程或计算机已关闭)的每种情况.

A recovery situation is every situation that produce an "Hard-shutdown" (i.e. the process it is running within crashes, or the machine is shut down).

要回答第二个问题:

  • 如果JVM在作业执行过程中崩溃,则Quartz将恢复该作业

  • If the JVM crashes during a job execution > Quartz will recover the job

(因为崩溃是恢复情况)

(Because a crash is Recovery situation)

如果由于异常导致作业执行失败> Quartz将无法恢复作业

if the job execution fails because of an exception > Quartz will not recover the job

(由于异常不是强制关闭,因此会抛出 misfire )

(Because exception is not an hard-shutdown, a misfire is thrown instead)

请参见激活工作恢复的答案.

See this answer to activate recovery for your jobs.

这篇关于石英作业详细要求恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 05:54