Search in sources :

Example 1 with CustomThreadRunsPolicy

use of com.dtstack.taier.common.CustomThreadRunsPolicy in project Taier by DTStack.

the class AbstractJobSummitScheduler method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    super.afterPropertiesSet();
    scheduleJobQueue = new LinkedBlockingQueue<>(env.getQueueSize());
    String threadName = this.getClass().getSimpleName() + "_" + getSchedulerName() + "_startJobProcessor";
    executorService = new ThreadPoolExecutor(env.getJobExecutorPoolCorePoolSize(), env.getJobExecutorPoolMaximumPoolSize(), env.getJobExecutorPoolKeepAliveTime(), TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(env.getJobExecutorPoolQueueSize()), new CustomThreadFactory(threadName), new CustomThreadRunsPolicy(threadName, getSchedulerName()));
}
Also used : CustomThreadFactory(com.dtstack.taier.pluginapi.CustomThreadFactory) CustomThreadRunsPolicy(com.dtstack.taier.common.CustomThreadRunsPolicy) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) LinkedBlockingQueue(java.util.concurrent.LinkedBlockingQueue)

Aggregations

CustomThreadRunsPolicy (com.dtstack.taier.common.CustomThreadRunsPolicy)1 CustomThreadFactory (com.dtstack.taier.pluginapi.CustomThreadFactory)1 LinkedBlockingQueue (java.util.concurrent.LinkedBlockingQueue)1 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1