/** * <p> * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with * the given name. * </p> * * <p> * If any of the <code>Job</code>'s<code>Trigger</code> s missed one * or more fire-times, then the <code>Trigger</code>'s misfire * instruction will be applied. * </p> * */ public void resumeJob(JobKey jobKey) { synchronized (lock) { List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { resumeTrigger(trigger.getKey()); } } }
/** * <p> * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with * the given name. * </p> * * <p> * If any of the <code>Job</code>'s<code>Trigger</code> s missed one * or more fire-times, then the <code>Trigger</code>'s misfire * instruction will be applied. * </p> * */ public void resumeJob(JobKey jobKey) { synchronized (lock) { List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { resumeTrigger(trigger.getKey()); } } }
resumeTrigger(triggerKey);
resumeTrigger(triggerKey);
List<OperableTrigger> triggersOfJob = getTriggersForJob(key); for (OperableTrigger trigger: triggersOfJob) { resumeTrigger(trigger.getKey());
List<OperableTrigger> triggersOfJob = getTriggersForJob(key); for (OperableTrigger trigger: triggersOfJob) { resumeTrigger(trigger.getKey());
@Override public void resumeTrigger(TriggerKey triggerKey) { super.resumeTrigger(triggerKey); persistChangeOfState(triggerKey, Trigger.TriggerState.NORMAL); }
@Override public void resumeTrigger(TriggerKey triggerKey) { super.resumeTrigger(triggerKey); persistChangeOfState(triggerKey, Trigger.TriggerState.NORMAL); }
/** * <p> * Resume (un-pause) all of the <code>{@link Trigger}s</code> in the * given group. * </p> * * <p> * If any <code>Trigger</code> missed one or more fire-times, then the * <code>Trigger</code>'s misfire instruction will be applied. * </p> * */ public void resumeTriggerGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { String[] names = getTriggerNames(ctxt, groupName); for (int i = 0; i < names.length; i++) { String key = TriggerWrapper.getTriggerNameKey(names[i], groupName); if(triggersByFQN.get(key) != null) { String jobGroup = ((TriggerWrapper) triggersByFQN.get(key)).getTrigger().getJobGroup(); if(pausedJobGroups.contains(jobGroup)) { continue; } } resumeTrigger(ctxt, names[i], groupName); } pausedTriggerGroups.remove(groupName); } }
/** * <p> * Resume (un-pause) all of the <code>{@link Trigger}s</code> in the * given group. * </p> * * <p> * If any <code>Trigger</code> missed one or more fire-times, then the * <code>Trigger</code>'s misfire instruction will be applied. * </p> * */ public void resumeTriggerGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { String[] names = getTriggerNames(ctxt, groupName); for (int i = 0; i < names.length; i++) { String key = TriggerWrapper.getTriggerNameKey(names[i], groupName); if(triggersByFQN.get(key) != null) { String jobGroup = ((TriggerWrapper) triggersByFQN.get(key)).getTrigger().getJobGroup(); if(pausedJobGroups.contains(jobGroup)) { continue; } } resumeTrigger(ctxt, names[i], groupName); } pausedTriggerGroups.remove(groupName); } }
/** * <p> * Resume (un-pause) all of the <code>{@link org.quartz.JobDetail}s</code> * in the given group. * </p> * * <p> * If any of the <code>Job</code> s had <code>Trigger</code> s that * missed one or more fire-times, then the <code>Trigger</code>'s * misfire instruction will be applied. * </p> * */ public void resumeJobGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { String[] jobNames = getJobNames(ctxt, groupName); if(pausedJobGroups.contains(groupName)) { pausedJobGroups.remove(groupName); } for (int i = 0; i < jobNames.length; i++) { Trigger[] triggers = getTriggersForJob(ctxt, jobNames[i], groupName); for (int j = 0; j < triggers.length; j++) { resumeTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } } }
/** * <p> * Resume (un-pause) all of the <code>{@link org.quartz.JobDetail}s</code> * in the given group. * </p> * * <p> * If any of the <code>Job</code> s had <code>Trigger</code> s that * missed one or more fire-times, then the <code>Trigger</code>'s * misfire instruction will be applied. * </p> * */ public void resumeJobGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { String[] jobNames = getJobNames(ctxt, groupName); if(pausedJobGroups.contains(groupName)) { pausedJobGroups.remove(groupName); } for (int i = 0; i < jobNames.length; i++) { Trigger[] triggers = getTriggersForJob(ctxt, jobNames[i], groupName); for (int j = 0; j < triggers.length; j++) { resumeTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } } }
/** * <p> * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with * the given name. * </p> * * <p> * If any of the <code>Job</code>'s<code>Trigger</code> s missed one * or more fire-times, then the <code>Trigger</code>'s misfire * instruction will be applied. * </p> * */ public void resumeJob(SchedulingContext ctxt, String jobName, String groupName) { synchronized (triggerLock) { Trigger[] triggers = getTriggersForJob(ctxt, jobName, groupName); for (int j = 0; j < triggers.length; j++) { resumeTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } }
/** * <p> * Resume (un-pause) the <code>{@link org.quartz.JobDetail}</code> with * the given name. * </p> * * <p> * If any of the <code>Job</code>'s<code>Trigger</code> s missed one * or more fire-times, then the <code>Trigger</code>'s misfire * instruction will be applied. * </p> * */ public void resumeJob(SchedulingContext ctxt, String jobName, String groupName) { synchronized (triggerLock) { Trigger[] triggers = getTriggersForJob(ctxt, jobName, groupName); for (int j = 0; j < triggers.length; j++) { resumeTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } }