/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(JobKey jobKey) { synchronized (lock) { List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { pauseTrigger(trigger.getKey()); } } }
/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(JobKey jobKey) { synchronized (lock) { List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { pauseTrigger(trigger.getKey()); } } }
List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { pauseTrigger(trigger.getKey());
List<OperableTrigger> triggersOfJob = getTriggersForJob(jobKey); for (OperableTrigger trigger: triggersOfJob) { pauseTrigger(trigger.getKey());
@Override public void pauseTrigger(TriggerKey triggerKey) { super.pauseTrigger(triggerKey); persistChangeOfState(triggerKey, Trigger.TriggerState.PAUSED); }
@Override public void pauseTrigger(TriggerKey triggerKey) { super.pauseTrigger(triggerKey); persistChangeOfState(triggerKey, Trigger.TriggerState.PAUSED); }
/** * <p> * Pause all of the <code>{@link Trigger}s</code> in the given group. * </p> * * <p> * The JobStore should "remember" that the group is paused, and impose the * pause on any new triggers that are added to the group while the group is * paused. * </p> * */ public void pauseTriggerGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { if (pausedTriggerGroups.contains(groupName)) { return; } pausedTriggerGroups.add(groupName); String[] names = getTriggerNames(ctxt, groupName); for (int i = 0; i < names.length; i++) { pauseTrigger(ctxt, names[i], groupName); } } }
/** * <p> * Pause all of the <code>{@link Trigger}s</code> in the given group. * </p> * * <p> * The JobStore should "remember" that the group is paused, and impose the * pause on any new triggers that are added to the group while the group is * paused. * </p> * */ public void pauseTriggerGroup(SchedulingContext ctxt, String groupName) { synchronized (triggerLock) { if (pausedTriggerGroups.contains(groupName)) { return; } pausedTriggerGroups.add(groupName); String[] names = getTriggerNames(ctxt, groupName); for (int i = 0; i < names.length; i++) { pauseTrigger(ctxt, names[i], groupName); } } }
/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(SchedulingContext ctxt, String jobName, String groupName) { synchronized (triggerLock) { Trigger[] triggers = getTriggersForJob(ctxt, jobName, groupName); for (int j = 0; j < triggers.length; j++) { pauseTrigger(ctxt, triggers[j].getName(), triggers[j].getGroup()); } } }
/** * <p> * Pause the <code>{@link org.quartz.JobDetail}</code> with the given * name - by pausing all of its current <code>Trigger</code>s. * </p> * */ public void pauseJob(SchedulingContext ctxt, String jobName, String groupName) { synchronized (triggerLock) { Trigger[] triggers = getTriggersForJob(ctxt, jobName, 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> * 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()); } } } }
super.pauseTrigger(trigger.trigger.getKey());
super.pauseTrigger(trigger.trigger.getKey());