protected boolean applyMisfire(OperableTrigger trigger, T jedis) throws JobPersistenceException {
        long misfireTime = System.currentTimeMillis();
        if(misfireThreshold > 0){
            misfireTime -= misfireThreshold;
        }
        final Date nextFireTime = trigger.getNextFireTime();
        if(nextFireTime == null || nextFireTime.getTime() > misfireTime
                || trigger.getMisfireInstruction() == Trigger.MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY){
            return false;
        }

        Calendar calendar = null;
        if(trigger.getCalendarName() != null){
            calendar = retrieveCalendar(trigger.getCalendarName(), jedis);
        }
        signaler.notifyTriggerListenersMisfired((OperableTrigger) trigger.clone());

        trigger.updateAfterMisfire(calendar);

        storeTrigger(trigger, true, jedis);
        if(trigger.getNextFireTime() == null){
            setTriggerState(RedisTriggerState.COMPLETED, (double) System.currentTimeMillis(), redisSchema.triggerHashKey(trigger.getKey()), jedis);
            signaler.notifySchedulerListenersFinalized(trigger);
        }
        else if(nextFireTime.equals(trigger.getNextFireTime())){
            return false;
        }
        return true;
    }
protected boolean applyMisfire ( OperableTrigger trigger , T jedis ) throws JobPersistenceException { long misfireTime = System . currentTimeMillis ( ) ; if ( misfireThreshold > 0 ) { misfireTime -= misfireThreshold ; } final Date nextFireTime = trigger . getNextFireTime ( ) ; if ( nextFireTime == null || nextFireTime . getTime ( ) > misfireTime || trigger . getMisfireInstruction ( ) == Trigger . MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY ) { return false ; } Calendar calendar = null ; if ( trigger . getCalendarName ( ) != null ) { calendar = retrieveCalendar ( trigger . getCalendarName ( ) , jedis ) ; } signaler . notifyTriggerListenersMisfired ( ( OperableTrigger ) trigger . clone ( ) ) ; trigger . updateAfterMisfire ( calendar ) ; storeTrigger ( trigger , true , jedis ) ; if ( trigger . getNextFireTime ( ) == null ) { setTriggerState ( RedisTriggerState . COMPLETED , ( double ) System . currentTimeMillis ( ) , redisSchema . triggerHashKey ( trigger . getKey ( ) ) , jedis ) ; signaler . notifySchedulerListenersFinalized ( trigger ) ; } else if ( nextFireTime . equals ( trigger . getNextFireTime ( ) ) ) { return false ; } return true ; }
Determine whether or not the given trigger has misfired.
If so, notify the {@link org.quartz.spi.SchedulerSignaler} and update the trigger.
@param trigger the trigger to check for misfire
@param jedis a thread-safe Redis connection
@return false if the trigger has misfired; true otherwise
@throws JobPersistenceException