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


Java SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount方法代码示例

本文整理汇总了Java中org.quartz.SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount方法的典型用法代码示例。如果您正苦于以下问题:Java SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount方法的具体用法?Java SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount怎么用?Java SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.quartz.SimpleScheduleBuilder的用法示例。


在下文中一共展示了SimpleScheduleBuilder.withMisfireHandlingInstructionNowWithExistingCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getScheduleBuilder

import org.quartz.SimpleScheduleBuilder; //导入方法依赖的package包/类
/**
 * Get a {@link ScheduleBuilder} that is configured to produce a 
 * schedule identical to this trigger's schedule.
 * 
 * @see #getTriggerBuilder()
 */
@Override
public ScheduleBuilder<SimpleTrigger> getScheduleBuilder() {
    
    SimpleScheduleBuilder sb = SimpleScheduleBuilder.simpleSchedule()
    .withIntervalInMilliseconds(getRepeatInterval())
    .withRepeatCount(getRepeatCount());
    
    switch(getMisfireInstruction()) {
        case MISFIRE_INSTRUCTION_FIRE_NOW : sb.withMisfireHandlingInstructionFireNow();
        break;
        case MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT : sb.withMisfireHandlingInstructionNextWithExistingCount();
        break;
        case MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT : sb.withMisfireHandlingInstructionNextWithRemainingCount();
        break;
        case MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT : sb.withMisfireHandlingInstructionNowWithExistingCount();
        break;
        case MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT : sb.withMisfireHandlingInstructionNowWithRemainingCount();
        break;
    }
    
    return sb;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:SimpleTriggerImpl.java

示例2: setMisfirePolicyForSimpleTrigger

import org.quartz.SimpleScheduleBuilder; //导入方法依赖的package包/类
private SimpleScheduleBuilder setMisfirePolicyForSimpleTrigger(SimpleScheduleBuilder simpleSchedule, String motechMisfireProperty) {
    Integer misfirePolicy = simpleTriggerMisfirePolicies.get(motechMisfireProperty);
    if (misfirePolicy == null) {
        misfirePolicy = SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT;
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_SMART_POLICY)) {
        return simpleSchedule;
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW)) {
        return simpleSchedule.withMisfireHandlingInstructionFireNow();
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY)) {
        return simpleSchedule.withMisfireHandlingInstructionIgnoreMisfires();
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT)) {
        return simpleSchedule.withMisfireHandlingInstructionNextWithExistingCount();
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT)) {
        return simpleSchedule.withMisfireHandlingInstructionNextWithRemainingCount();
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT)) {
        return simpleSchedule.withMisfireHandlingInstructionNowWithExistingCount();
    }
    if (misfirePolicy.equals(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_REMAINING_REPEAT_COUNT)) {
        return simpleSchedule.withMisfireHandlingInstructionNowWithRemainingCount();
    }
    return simpleSchedule;
}
 
开发者ID:motech,项目名称:motech,代码行数:29,代码来源:MotechSchedulerServiceImpl.java


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