当前位置: 首页>>代码示例>>Java>>正文


Java CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE属性代码示例

本文整理汇总了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));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:30,代码来源:LoggingTriggerHistoryPlugin.java

示例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();
    }
}
 
开发者ID:disit,项目名称:sce-backend,代码行数:47,代码来源:LoggingTriggerHistoryPluginCustom.java


注:本文中的org.quartz.Trigger.CompletedExecutionInstruction.SET_ALL_JOB_TRIGGERS_COMPLETE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。