本文整理汇总了Java中org.quartz.Trigger.CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE属性的典型用法代码示例。如果您正苦于以下问题:Java CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE属性的具体用法?Java CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE怎么用?Java CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.quartz.Trigger.CompletedExecutionInstruction
的用法示例。
在下文中一共展示了CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: triggerComplete
public void triggerComplete(Trigger trigger, JobExecutionContext context,
CompletedExecutionInstruction triggerInstructionCode) {
if (!getLog().isInfoEnabled()) {
return;
}
String instrCode = "UNKNOWN";
if (triggerInstructionCode == CompletedExecutionInstruction.DELETE_TRIGGER) {
instrCode = "DELETE TRIGGER";
} else if (triggerInstructionCode == CompletedExecutionInstruction.NOOP) {
instrCode = "DO NOTHING";
} else if (triggerInstructionCode == CompletedExecutionInstruction.RE_EXECUTE_JOB) {
instrCode = "RE-EXECUTE JOB";
} else if (triggerInstructionCode == CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE) {
instrCode = "SET ALL OF JOB'S TRIGGERS COMPLETE";
} else if (triggerInstructionCode == CompletedExecutionInstruction.SET_TRIGGER_COMPLETE) {
instrCode = "SET THIS TRIGGER COMPLETE";
}
Object[] args = {
trigger.getKey().getName(), trigger.getKey().getGroup(),
trigger.getPreviousFireTime(), trigger.getNextFireTime(),
new java.util.Date(), context.getJobDetail().getKey().getName(),
context.getJobDetail().getKey().getGroup(),
Integer.valueOf(context.getRefireCount()),
triggerInstructionCode.toString(), instrCode
};
getLog().info(MessageFormat.format(getTriggerCompleteMessage(), args));
}
示例2: triggerComplete
@Override
public void triggerComplete(Trigger trigger, JobExecutionContext context,
CompletedExecutionInstruction triggerInstructionCode) {
try {
/*if (!getLog().isInfoEnabled()) {
return;
}*/
String ipAddress = getIpAddress();
String instrCode = "UNKNOWN";
if (triggerInstructionCode == CompletedExecutionInstruction.DELETE_TRIGGER) {
instrCode = "DELETE TRIGGER";
} else if (triggerInstructionCode == CompletedExecutionInstruction.NOOP) {
instrCode = "DO NOTHING";
} else if (triggerInstructionCode == CompletedExecutionInstruction.RE_EXECUTE_JOB) {
instrCode = "RE-EXECUTE JOB";
} else if (triggerInstructionCode == CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE) {
instrCode = "SET ALL OF JOB'S TRIGGERS COMPLETE";
} else if (triggerInstructionCode == CompletedExecutionInstruction.SET_TRIGGER_COMPLETE) {
instrCode = "SET THIS TRIGGER COMPLETE";
}
Object[] args = {
context.getFireInstanceId(),
context.getJobDetail().getKey().getName(),
context.getJobDetail().getKey().getGroup(),
jobDataMapToString(context.getJobDetail().getJobDataMap()),
new java.util.Date(),
trigger.getKey().getName(),
trigger.getKey().getGroup(),
trigger.getPreviousFireTime() != null ? trigger.getPreviousFireTime() : new Date(0),
trigger.getNextFireTime() != null ? trigger.getNextFireTime() : new Date(0),
Integer.toString(context.getRefireCount()),
triggerInstructionCode.toString(),
context.getScheduler().getSchedulerInstanceId(),
context.getScheduler().getSchedulerName(),
ipAddress != null ? ipAddress : "",
"COMPLETE",
"LoggingTriggerHistoryPluginCustom",
"INFO"
};
//getLog().info(MessageFormat.format(getTriggerCompleteMessage(), args));
//log but do not update QRTZ.STATUS table with the COMPLETE status (updateStatus = false)
logToDatabase(args, MessageFormat.format(getTriggerCompleteMessage(), args), false);
} catch (Exception e) {
e.printStackTrace();
}
}