/** * Updates the <CODE>NthIncludedDayTrigger</CODE>'s state based on the * MISFIRE_INSTRUCTION_XXX that was selected when the * <CODE>NthIncludedDayTrigger</CODE> was created * <P> * If the misfire instruction is set to MISFIRE_INSTRUCTION_SMART_POLICY, * then the instruction will be interpreted as * {@link #MISFIRE_INSTRUCTION_FIRE_ONCE_NOW}. * * @param calendar a new or updated calendar to use for the trigger */ public void updateAfterMisfire(Calendar calendar) { int instruction = getMisfireInstruction(); this.calendar = calendar; if (instruction == MISFIRE_INSTRUCTION_SMART_POLICY) { instruction = MISFIRE_INSTRUCTION_FIRE_ONCE_NOW; } if (instruction == MISFIRE_INSTRUCTION_DO_NOTHING) { this.nextFireTime = getFireTimeAfter(new Date()); } else if (instruction == MISFIRE_INSTRUCTION_FIRE_ONCE_NOW) { this.nextFireTime = new Date(); } }
/** * Updates the <CODE>NthIncludedDayTrigger</CODE>'s state based on the * MISFIRE_INSTRUCTION_XXX that was selected when the * <CODE>NthIncludedDayTrigger</CODE> was created * <P> * If the misfire instruction is set to MISFIRE_INSTRUCTION_SMART_POLICY, * then the instruction will be interpreted as * {@link #MISFIRE_INSTRUCTION_FIRE_ONCE_NOW}. * * @param calendar a new or updated calendar to use for the trigger */ public void updateAfterMisfire(Calendar calendar) { int instruction = getMisfireInstruction(); this.calendar = calendar; if (instruction == MISFIRE_INSTRUCTION_SMART_POLICY) { instruction = MISFIRE_INSTRUCTION_FIRE_ONCE_NOW; } if (instruction == MISFIRE_INSTRUCTION_DO_NOTHING) { this.nextFireTime = getFireTimeAfter(new Date()); } else if (instruction == MISFIRE_INSTRUCTION_FIRE_ONCE_NOW) { this.nextFireTime = new Date(); } }
/** * Updates the <CODE>NthIncludedDayTrigger</CODE>'s state based on the * MISFIRE_INSTRUCTION_XXX that was selected when the * <CODE>NthIncludedDayTrigger</CODE> was created * <P> * If the misfire instruction is set to MISFIRE_INSTRUCTION_SMART_POLICY, * then the instruction will be interpreted as * {@link #MISFIRE_INSTRUCTION_FIRE_ONCE_NOW}. * * @param calendar a new or updated calendar to use for the trigger */ public void updateAfterMisfire(Calendar calendar) { int instruction = getMisfireInstruction(); this.calendar = calendar; if (instruction == MISFIRE_INSTRUCTION_SMART_POLICY) { instruction = MISFIRE_INSTRUCTION_FIRE_ONCE_NOW; } if (instruction == MISFIRE_INSTRUCTION_DO_NOTHING) { this.nextFireTime = getFireTimeAfter(new Date()); } else if (instruction == MISFIRE_INSTRUCTION_FIRE_ONCE_NOW) { this.nextFireTime = new Date(); } }