org.quartz.core.QuartzSchedulerResources.getThreadName()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(64)

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

QuartzSchedulerResources.getThreadName介绍

[英]Get the name for the QuartzSchedulerThread.
[中]获取[$0$]的名称。

代码示例

代码示例来源:origin: quartz-scheduler/quartz

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given
 * <code>QuartzScheduler</code> as a <code>Thread</code> with the given
 * attributes.
 * </p>
 */
QuartzSchedulerThread(QuartzScheduler qs, QuartzSchedulerResources qsRsrcs, boolean setDaemon, int threadPrio) {
  super(qs.getSchedulerThreadGroup(), qsRsrcs.getThreadName());
  this.qs = qs;
  this.qsRsrcs = qsRsrcs;
  this.setDaemon(setDaemon);
  if(qsRsrcs.isThreadsInheritInitializersClassLoadContext()) {
    log.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
    this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  }
  this.setPriority(threadPrio);
  // start the underlying thread, but put this object into the 'paused'
  // state
  // so processing doesn't start yet...
  paused = true;
  halted = new AtomicBoolean(false);
}

代码示例来源:origin: quartz-scheduler/quartz

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given
 * <code>QuartzScheduler</code> as a <code>Thread</code> with the given
 * attributes.
 * </p>
 */
QuartzSchedulerThread(QuartzScheduler qs, QuartzSchedulerResources qsRsrcs, boolean setDaemon, int threadPrio) {
  super(qs.getSchedulerThreadGroup(), qsRsrcs.getThreadName());
  this.qs = qs;
  this.qsRsrcs = qsRsrcs;
  this.setDaemon(setDaemon);
  if(qsRsrcs.isThreadsInheritInitializersClassLoadContext()) {
    log.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
    this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  }
  this.setPriority(threadPrio);
  // start the underlying thread, but put this object into the 'paused'
  // state
  // so processing doesn't start yet...
  paused = true;
  halted = new AtomicBoolean(false);
}

代码示例来源:origin: com.xeiam/sundial

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given <code>QuartzScheduler</code> as a <code>Thread</code> with the given attributes.
 * </p>
 */
private QuartzSchedulerThread(QuartzScheduler quartzScheduler, QuartzSchedulerResources quartzSchedulerResources, boolean setDaemon, int threadPrio) {
 super(quartzScheduler.getSchedulerThreadGroup(), quartzSchedulerResources.getThreadName());
 this.quartzScheduler = quartzScheduler;
 this.quartzSchedulerResources = quartzSchedulerResources;
 this.setDaemon(setDaemon);
 if (quartzSchedulerResources.isThreadsInheritInitializersClassLoadContext()) {
  logger.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
  this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
 }
 this.setPriority(threadPrio);
 // start the underlying thread, but put this object into the 'paused'
 // state
 // so processing doesn't start yet...
 paused = true;
 halted = new AtomicBoolean(false);
}

代码示例来源:origin: org.knowm/sundial

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given <code>QuartzScheduler</code> as a <code>Thread</code> with the given attributes.
 * </p>
 */
private QuartzSchedulerThread(QuartzScheduler quartzScheduler, QuartzSchedulerResources quartzSchedulerResources, boolean setDaemon,
  int threadPrio) {
 super(quartzScheduler.getSchedulerThreadGroup(), quartzSchedulerResources.getThreadName());
 this.quartzScheduler = quartzScheduler;
 this.quartzSchedulerResources = quartzSchedulerResources;
 this.setDaemon(setDaemon);
 if (quartzSchedulerResources.isThreadsInheritInitializersClassLoadContext()) {
  logger.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
  this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
 }
 this.setPriority(threadPrio);
 // start the underlying thread, but put this object into the 'paused'
 // state
 // so processing doesn't start yet...
 paused = true;
 halted = new AtomicBoolean(false);
}

代码示例来源:origin: knowm/Sundial

/**
 * Construct a new <code>QuartzSchedulerThread</code> for the given <code>QuartzScheduler</code>
 * as a <code>Thread</code> with the given attributes.
 */
private QuartzSchedulerThread(
  QuartzScheduler quartzScheduler,
  QuartzSchedulerResources quartzSchedulerResources,
  boolean setDaemon,
  int threadPrio) {
 super(quartzScheduler.getSchedulerThreadGroup(), quartzSchedulerResources.getThreadName());
 this.quartzScheduler = quartzScheduler;
 this.quartzSchedulerResources = quartzSchedulerResources;
 this.setDaemon(setDaemon);
 if (quartzSchedulerResources.isThreadsInheritInitializersClassLoadContext()) {
  logger.info(
    "QuartzSchedulerThread Inheriting ContextClassLoader of thread: "
      + Thread.currentThread().getName());
  this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
 }
 this.setPriority(threadPrio);
 // start the underlying thread, but put this object into the 'paused'
 // state
 // so processing doesn't start yet...
 paused = true;
 halted = new AtomicBoolean(false);
}

代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given
 * <code>QuartzScheduler</code> as a <code>Thread</code> with the given
 * attributes.
 * </p>
 */
QuartzSchedulerThread(QuartzScheduler qs, QuartzSchedulerResources qsRsrcs,
    SchedulingContext ctxt, boolean setDaemon, int threadPrio) {
  super(qs.getSchedulerThreadGroup(), qsRsrcs.getThreadName());
  this.qs = qs;
  this.qsRsrcs = qsRsrcs;
  this.ctxt = ctxt;
  this.setDaemon(setDaemon);
  if(qsRsrcs.isThreadsInheritInitializersClassLoadContext()) {
    log.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
    this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  }
  
  this.setPriority(threadPrio);
  // start the underlying thread, but put this object into the 'paused'
  // state
  // so processing doesn't start yet...
  paused = true;
  halted = false;
  this.start();
}

代码示例来源:origin: quartz/quartz-all

/**
 * <p>
 * Construct a new <code>QuartzSchedulerThread</code> for the given
 * <code>QuartzScheduler</code> as a <code>Thread</code> with the given
 * attributes.
 * </p>
 */
QuartzSchedulerThread(QuartzScheduler qs, QuartzSchedulerResources qsRsrcs,
    SchedulingContext ctxt, boolean setDaemon, int threadPrio) {
  super(qs.getSchedulerThreadGroup(), qsRsrcs.getThreadName());
  this.qs = qs;
  this.qsRsrcs = qsRsrcs;
  this.ctxt = ctxt;
  this.setDaemon(setDaemon);
  if(qsRsrcs.isThreadsInheritInitializersClassLoadContext()) {
    log.info("QuartzSchedulerThread Inheriting ContextClassLoader of thread: " + Thread.currentThread().getName());
    this.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  }
  
  this.setPriority(threadPrio);
  // start the underlying thread, but put this object into the 'paused'
  // state
  // so processing doesn't start yet...
  paused = true;
  halted = false;
  this.start();
}

相关文章

微信公众号

最新文章

更多

QuartzSchedulerResources类方法