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

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

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

Scheduler.getSchedulerInstanceId介绍

[英]Returns the instance Id of the Scheduler.
[中]返回[$0$]的实例Id。

代码示例

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

public String getSchedulerInstanceId() throws SchedulerException {
  return scheduler.getSchedulerInstanceId();
}

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

public String getSchedulerInstanceId() throws SchedulerException {
  return this.scheduler.getSchedulerInstanceId();
}

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

@Override
public String getSchedulerInstanceId() throws QuartzException {
  try {
    return delegate.getSchedulerInstanceId();
  } catch (SchedulerException e) {
    throw new QuartzException(e);
  }
}

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

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

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

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

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

@Override
public String getSchedulerInstanceId() throws QuartzException {
  try {
    return delegate.getSchedulerInstanceId();
  } catch (SchedulerException e) {
    throw new QuartzException(e);
  }
}

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

@Override
public String getSchedulerInstanceId() throws SchedulerException {
  return getScheduler().getSchedulerInstanceId();
}

代码示例来源:origin: liveoak-io/liveoak

@Override
public Map<String, ?> properties(RequestContext ctx) throws Exception {
  Map<String, Object> result = new HashMap<>();
  if (this.scheduler.isStarted()) {
    result.put("status", "started");
  } else {
    result.put("stats", "stopped");
  }
  result.put("name", this.scheduler.getSchedulerName());
  result.put("instance-id", this.scheduler.getSchedulerInstanceId());
  SchedulerMetaData metaData = this.scheduler.getMetaData();
  result.put("running-since", metaData.getRunningSince());
  return result;
}

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

private String retrieveSchedulerNameAndId() {
  try {
    return scheduler.getSchedulerName() + "_$_" + scheduler.getSchedulerInstanceId();
  } catch (SchedulerException e) {
    throw new QuartzRuntimeException(e);
  }
}

代码示例来源:origin: com.quhaodian.discover/discover-quartz

/**
 * @param model
 */
private void init(Model model) {
  Scheduler scheduler = getScheduler();
  if (scheduler != null) {
    try {
      model.addAttribute("schedulerName", scheduler.getSchedulerName());
      if (scheduler.isStarted()) {
        model.addAttribute("started", true);
      } else {
        model.addAttribute("started", false);
      }
      if (scheduler.isShutdown()) {
        model.addAttribute("shutdown", true);
      } else {
        model.addAttribute("shutdown", false);
      }
      model.addAttribute("instanceId", scheduler.getSchedulerInstanceId());
      model.addAttribute("nums", scheduler.getMetaData().getNumberOfJobsExecuted());
    } catch (SchedulerException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: org.apache.sling/org.apache.sling.commons.scheduler

final org.quartz.Scheduler current = allSchedulersIter.next();
if ( name.equals(current.getSchedulerName())
  && runID.equals(current.getSchedulerInstanceId()) ) {
  s = current;

代码示例来源:origin: org.apache.sling/org.apache.sling.commons.scheduler

pw.println(entry.getKey());
pw.print  ("Id        : ");
pw.println(s.getSchedulerInstanceId());
pw.println();
final List<JobInfo> activeJobs = new ArrayList<>();

代码示例来源:origin: org.apache.syncope.core/syncope-core-provisioning-java

String instanceId = "AUTO";
try {
  instanceId = scheduler.getScheduler().getSchedulerInstanceId();
  scheduler.getScheduler().standby();

代码示例来源:origin: org.kuali.kfs/kfs-core

int currentStepNumber = 0;
try {
  LOG.info("Executing job: " + jobExecutionContext.getJobDetail() + " on machine " + getMachineName() + " scheduler instance id " + jobExecutionContext.getScheduler().getSchedulerInstanceId() + "\n" + jobDataMapToString(jobExecutionContext.getJobDetail().getJobDataMap()));
  for (Step step : getSteps()) {
    currentStepNumber++;

代码示例来源:origin: pl.touk.hades/hades-quartz

this.schedulerInstanceId = scheduler.getSchedulerInstanceId();
this.hadesQuartzGroup = hadesQuartzGroupPrefix + schedulerName;
String suffix = hades.getMainDsName() + '_' + hades.getFailoverDsName();

相关文章