org.quartz.Scheduler.resumeTrigger()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.quartz.Scheduler.resumeTrigger()方法的一些代码示例,展示了Scheduler.resumeTrigger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.resumeTrigger()方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:resumeTrigger

Scheduler.resumeTrigger介绍

[英]Resume (un-pause) the Trigger with the given name.

If the Trigger missed one or more fire-times, then the Trigger's misfire instruction will be applied.
[中]恢复(取消暂停)具有给定名称的Trigger
如果Trigger错过了一次或多次点火,则Trigger的失火指令将被应用。

代码示例

代码示例来源:origin: org.rhq/rhq-enterprise-server

public void resumeTrigger(String triggerName, String groupName) throws SchedulerException {
  scheduler.resumeTrigger(triggerName, groupName);
}

代码示例来源:origin: org.rhq/rhq-enterprise-server

public void resumeTrigger(String triggerName, String groupName) throws SchedulerException {
  this.scheduler.resumeTrigger(triggerName, groupName);
}

代码示例来源:origin: io.antmedia/ant-media-server-common

public void resumeScheduledTrigger(String name) {
  try {
    scheduler.resumeTrigger(keyMap.get(name).tKey);
  } catch (SchedulerException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: yejq/quartz-spring-manager

@RequestMapping(value = "/resumeTrigger", method = RequestMethod.GET)
public String resumeTrigger(String name, String group) {
  try {
    scheduler.resumeTrigger(name, group);
  } catch (Exception e) {
    e.printStackTrace();
  }
  return "redirect:/scheduler/";
}

代码示例来源:origin: Red5/red5-server-common

public void resumeScheduledTrigger(String name) {
  try {
    scheduler.resumeTrigger(keyMap.get(name).tKey);
  } catch (SchedulerException ex) {
    throw new RuntimeException(ex);
  }
}

代码示例来源:origin: myschedule/myschedule-quartz-extra

public void resumeTrigger(TriggerKey triggerKey) {
  try {
    scheduler.resumeTrigger(triggerKey);
  } catch (SchedulerException e) {
    throw new QuartzRuntimeException(e);
  }
}

代码示例来源:origin: org.codelibs/elasticsearch-quartz

public void resumeTrigger(final TriggerKey triggerKey) {
  try {
    scheduler.resumeTrigger(triggerKey);
  } catch (final SchedulerException e) {
    throw new QuartzSchedulerException(e);
  }
}

代码示例来源:origin: com.blazebit/blaze-quartz-utils

public static void resume(TriggerKey key) throws SchedulerException {
  Scheduler sched = StdSchedulerFactory.getDefaultScheduler();
  sched.resumeTrigger(key);
}

代码示例来源:origin: org.jboss.seam/jboss-seam

public void resume() throws SchedulerException
{
 getScheduler().resumeTrigger(triggerName, null);
}

代码示例来源:origin: org.alfresco/alfresco-repository

protected void startTimer() throws SchedulerException
{
  scheduler.resumeTrigger(trigger.getKey());
}

代码示例来源:origin: Alfresco/alfresco-repository

protected void startTimer() throws SchedulerException
{
  scheduler.resumeTrigger(trigger.getKey());
}

代码示例来源:origin: OpenWiseSolutions/openhub-framework

@Override
public void resumeTrigger(TriggerKey triggerKey) throws SchedulerException {
  getScheduler().resumeTrigger(triggerKey);
}

代码示例来源:origin: org.apache.camel/camel-quartz2

public void resumeTrigger() throws Exception {
  if (!jobPaused.get()) {
    return;
  }
  jobPaused.set(false);
  Scheduler scheduler = getComponent().getScheduler();
  if (scheduler != null) {
    LOG.info("Resuming trigger {}", triggerKey);
    scheduler.resumeTrigger(triggerKey);
  }
}

代码示例来源:origin: bingoohuang/quartz-glass

@RequestMapping("/jobs/{group}/{name}/triggers/{triggerGroup}/{triggerName}/resume")
public String resume(@PathVariable String group, @PathVariable String name, @PathVariable String triggerGroup, @PathVariable String triggerName, @RequestParam(required = false) String redirect) throws SchedulerException {
  JobDetail job = quartzScheduler.getJobDetail(new JobKey(name, group));
  if (job == null) return "redirect:/glass/jobs";
  quartzScheduler.resumeTrigger(new TriggerKey(triggerName, triggerGroup));
  if (StringUtils.isNotEmpty(redirect)) return "redirect:" + redirect;
  return "redirect:/glass";
}

代码示例来源:origin: org.apache.camel/camel-quartz2

public void resumeRouteTrigger(Action action, String routeId) throws SchedulerException {
  TriggerKey triggerKey = retrieveTriggerKey(action, routeId);
  
  getScheduler().resumeTrigger(triggerKey);
  LOG.debug("Scheduled trigger: {} is resumed", triggerKey);
}

代码示例来源:origin: pl.edu.icm.sedno/sedno-tools

public void resumeTrigger(String triggerName) {
  try {
    getScheduler().resumeTrigger(triggerName, getTrigger(triggerName).getGroup());
  }catch (SchedulerException e) {
    throw new RuntimeException(e);
  }    
}

代码示例来源:origin: org.apache.camel/camel-quartz

public void resumeRouteTrigger(Action action, String routeId) throws SchedulerException {
  String triggerName = retrieveTriggerName(action, routeId);
  String triggerGroup = retrieveTriggerGroup(action, routeId);
  
  getScheduler().resumeTrigger(triggerName, triggerGroup);
  LOG.debug("Scheduled trigger: {}.{} is resumed", triggerGroup, triggerName);
}

代码示例来源:origin: metatron-app/metatron-discovery

@RequestMapping(value = "/jobs/{group}/{name}/resume", method = RequestMethod.POST, produces = "application/json")
public ResponseEntity<?> resumeJob(@PathVariable("group") String group,
                  @PathVariable("name") String name) throws SchedulerException {
 TriggerKey triggerKey = new TriggerKey(name, group);
 Trigger trigger = scheduler.getTrigger(triggerKey);
 if (trigger == null) {
  return ResponseEntity.notFound().build();
 }
 scheduler.resumeTrigger(triggerKey);
 return ResponseEntity.noContent().build();
}

代码示例来源:origin: com.threewks.thundr/thundr-contrib-quartz

@Override
public void resumeTrigger(TriggerKey triggerKey) throws QuartzException {
  try {
    delegate.resumeTrigger(triggerKey);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

代码示例来源:origin: com.threewks.thundr/thundr-quartz

@Override
public void resumeTrigger(TriggerKey triggerKey) throws QuartzException {
  try {
    delegate.resumeTrigger(triggerKey);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

相关文章