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

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

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

Scheduler.deleteJobs介绍

[英]Delete the identified Jobs from the Scheduler - and any associated Triggers.

Note that while this bulk operation is likely more efficient than invoking deleteJob(JobKey jobKey) several times, it may have the adverse affect of holding data locks for a single long duration of time (rather than lots of small durations of time).
[中]

代码示例

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

public boolean deleteJobs(List<JobKey> jobKeys) {
  try {
    return scheduler.deleteJobs(jobKeys);
  } catch (SchedulerException e) {
    throw new QuartzRuntimeException(e);
  }
}

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

public boolean deleteJobs(final List<JobKey> jobKeys) {
  try {
    return scheduler.deleteJobs(jobKeys);
  } catch (final SchedulerException e) {
    throw new QuartzSchedulerException(e);
  }
}

代码示例来源:origin: lvhao/schedule-job

/**
 * 删除任务
 *
 * @param jobKeyList
 */
public boolean remove(List<JobKey> jobKeyList){
  try {
    return scheduler.deleteJobs(jobKeyList);
  } catch (SchedulerException e) {
    e.printStackTrace();
  }
  return false;
}

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

@Override
public boolean deleteJobs(List<JobKey> jobKeys) throws SchedulerException {
  return getScheduler().deleteJobs(jobKeys);
}

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

@Override
public boolean deleteJobs(List<JobKey> jobKeys) throws QuartzException {
  try {
    return delegate.deleteJobs(jobKeys);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

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

@Override
public boolean deleteJobs(List<JobKey> jobKeys) throws QuartzException {
  try {
    return delegate.deleteJobs(jobKeys);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-event

Set<JobKey> jobs = scheduler.getJobKeys(matcher);
try {
  scheduler.deleteJobs(new ArrayList<>(jobs)); // raise a lock error in case of concurrencies
  for (Schedule each : registry.getSchedules()) {
    registerSchedule(each);

相关文章