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

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

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

Scheduler.deleteCalendar介绍

[英]Delete the identified Calendar from the Scheduler.

If removal of the Calendar would result in Triggers pointing to non-existent calendars, then a SchedulerException will be thrown.
[中]从计划程序中删除已标识的Calendar
如果删除Calendar会导致Trigger指向不存在的日历,则会抛出SchedulerException

代码示例

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

public boolean deleteCalendar(String calName) throws SchedulerException {
  return scheduler.deleteCalendar(calName);
}

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

public boolean deleteCalendar(String calName) throws SchedulerException {
  return this.scheduler.deleteCalendar(calName);
}

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

public boolean deleteCalendar(final String calName) {
  try {
    return scheduler.deleteCalendar(calName);
  } catch (final SchedulerException e) {
    throw new QuartzSchedulerException(e);
  }
}

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

@Override
public boolean deleteCalendar(String calName) throws SchedulerException {
  return getScheduler().deleteCalendar(calName);
}

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

public boolean deleteCalendar(String calendarName) {
  try {
    return scheduler.deleteCalendar(calendarName);
  } catch (SchedulerException e) {
    throw new QuartzRuntimeException(e);
  }
}

代码示例来源:origin: youseries/uflo

@Override
public void deleteJob(long reminderId){
  try {
    scheduler.deleteJob(new JobKey(JOB_NAME_PREFIX+reminderId,JOB_GROUP_PREFIX));
    String calendarId=REMINDER_CALENDAR_PREFIX+reminderId;
    scheduler.deleteCalendar(calendarId);
  } catch (SchedulerException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: com.bstek.uflo/uflo-core

@Override
public void deleteJob(long reminderId){
  try {
    scheduler.deleteJob(new JobKey(JOB_NAME_PREFIX+reminderId,JOB_GROUP_PREFIX));
    String calendarId=REMINDER_CALENDAR_PREFIX+reminderId;
    scheduler.deleteCalendar(calendarId);
  } catch (SchedulerException e) {
    throw new RuntimeException(e);
  }
}

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

@Override
public boolean deleteCalendar(String calName) throws QuartzException {
  try {
    return delegate.deleteCalendar(calName);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

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

@Override
public boolean deleteCalendar(String calName) throws QuartzException {
  try {
    return delegate.deleteCalendar(calName);
  } catch (SchedulerException e) {
    Logger.error(e.getMessage());
    throw new QuartzException(e);
  }
}

代码示例来源:origin: com.bstek.uflo/uflo-core

public void removeReminderJob(Task task) {
  List<TaskReminder> reminders=taskService.getTaskReminders(task.getId());
  for(TaskReminder reminder:reminders){
    try {
      scheduler.deleteJob(new JobKey(JOB_NAME_PREFIX+reminder.getId(),JOB_GROUP_PREFIX));
    } catch (SchedulerException e) {
      throw new RuntimeException(e);
    }
    String calendarId=REMINDER_CALENDAR_PREFIX+reminder.getId();
    try {
      scheduler.deleteCalendar(calendarId);
    } catch (SchedulerException e) {
      log.warning(e.getMessage());
    }
    taskService.deleteTaskReminder(reminder.getId());
    reminderTaskList.remove(reminder.getId());
  }
}

代码示例来源:origin: youseries/uflo

public void removeReminderJob(Task task) {
  List<TaskReminder> reminders=taskService.getTaskReminders(task.getId());
  for(TaskReminder reminder:reminders){
    try {
      scheduler.deleteJob(new JobKey(JOB_NAME_PREFIX+reminder.getId(),JOB_GROUP_PREFIX));
    } catch (SchedulerException e) {
      throw new RuntimeException(e);
    }
    String calendarId=REMINDER_CALENDAR_PREFIX+reminder.getId();
    try {
      scheduler.deleteCalendar(calendarId);
    } catch (SchedulerException e) {
      log.warning(e.getMessage());
    }
    taskService.deleteTaskReminder(reminder.getId());
    reminderTaskList.remove(reminder.getId());
  }
}

相关文章