/** * <p> * Pause all of the <code>{@link org.quartz.JobDetail}s</code> in the * given group - by pausing all of their <code>Trigger</code>s. * </p> * * * <p> * The JobStore should "remember" that the group is paused, and impose the * pause on any new jobs that are added to the group while the group is * paused. * </p> */ public void pauseJobGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { if (!pausedJobGroups.contains(groupName)) { pausedJobGroups.add(groupName); } String[] jobNames = getJobNames(ctxt, groupName); for (int i = 0; i < jobNames.length; i++) { Trigger[] triggers = getTriggersForJob(ctxt, jobNames[i], groupName); for (int j = 0; j < triggers.length; j++) { pauseTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } } }
/** * <p> * Pause all of the <code>{@link org.quartz.JobDetail}s</code> in the * given group - by pausing all of their <code>Trigger</code>s. * </p> * * * <p> * The JobStore should "remember" that the group is paused, and impose the * pause on any new jobs that are added to the group while the group is * paused. * </p> */ public void pauseJobGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { if (!pausedJobGroups.contains(groupName)) { pausedJobGroups.add(groupName); } String[] jobNames = getJobNames(ctxt, groupName); for (int i = 0; i < jobNames.length; i++) { Trigger[] triggers = getTriggersForJob(ctxt, jobNames[i], groupName); for (int j = 0; j < triggers.length; j++) { pauseTrigger(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) 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()); } } } }