本文整理了Java中org.quartz.core.QuartzSchedulerResources.isThreadsInheritInitializersClassLoadContext
方法的一些代码示例,展示了QuartzSchedulerResources.isThreadsInheritInitializersClassLoadContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuartzSchedulerResources.isThreadsInheritInitializersClassLoadContext
方法的具体详情如下:
包路径:org.quartz.core.QuartzSchedulerResources
类名称:QuartzSchedulerResources
方法名:isThreadsInheritInitializersClassLoadContext
[英]Get whether to set the class load context of spawned threads to that of the initializing thread.
[中]获取是否将派生线程的类加载上下文设置为初始化线程的类加载上下文。
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!