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

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

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

Scheduler.getTriggerNames介绍

[英]Get the names of all the Triggers in the given group.
[中]获取给定组中所有Triggers的名称。

代码示例

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

public String[] getTriggerNames(String groupName) throws SchedulerException {
  return scheduler.getTriggerNames(groupName);
}

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

public String[] getTriggerNames(String groupName) throws SchedulerException {
  return this.scheduler.getTriggerNames(groupName);
}

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

private List<Trigger> getAllTriggers() {
  
  List<Trigger> triggers = Lists.newArrayList();
  
  try {
    for (String triggerGroup : getScheduler().getTriggerGroupNames()) {
      for (String triggerName : getScheduler().getTriggerNames(triggerGroup)) {
        triggers.add(getScheduler().getTrigger(triggerName, triggerGroup));
      }
    }
  }catch (SchedulerException e) {
    throw new RuntimeException(e);
  }        
    
  Collections.sort(triggers);
  
  return triggers;	
}

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

/**
 * 启动定时器 如果xml配置文件中的description中,是以$paused_flag
 * 结尾的,表示这个trigger是暂停状态,不需要resume. 其它的trigger全部resume.
 */
public static void startupScheduler(Scheduler scheduler) throws SchedulerException {
  scheduler.pauseAll();
  scheduler.start();
  String[] triggerGroups = scheduler.getTriggerGroupNames();
  for (int i = 0; i < triggerGroups.length; i++) {
    String[] triggersInGroup = scheduler.getTriggerNames(triggerGroups[i]);
    for (int j = 0; j < triggersInGroup.length; j++) {
      Trigger t = scheduler.getTrigger(triggersInGroup[j], triggerGroups[i]);
      if (t.getDescription() == null || !t.getDescription().endsWith(PAUSED_FLAG)) {
        scheduler.resumeTrigger(triggersInGroup[j], triggerGroups[i]);
      }
    }
  }
}

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

tiggerGroup.setGroupName(triggerGroups[i]);
triggersInGroup = scheduler.getTriggerNames(triggerGroups[i]);
List<TriggerModel> triggerModels = new ArrayList<TriggerModel>();
for (int j = 0; j < triggersInGroup.length; j++) {

相关文章