use of org.infinispan.commons.executors.BlockingThreadPoolExecutorFactory in project wildfly by wildfly.
the class ThreadPoolBuilder method configure.
@Override
public Builder<ThreadPoolConfiguration> configure(OperationContext context, ModelNode model) throws OperationFailedException {
ThreadPoolExecutorFactory<?> factory = new BlockingThreadPoolExecutorFactory(this.definition.getMaxThreads().resolveModelAttribute(context, model).asInt(), this.definition.getMinThreads().resolveModelAttribute(context, model).asInt(), this.definition.getQueueLength().resolveModelAttribute(context, model).asInt(), this.definition.getKeepAliveTime().resolveModelAttribute(context, model).asLong()) {
@Override
public ExecutorService createExecutor(ThreadFactory factory) {
return super.createExecutor(new ClassLoaderThreadFactory(factory, ClassLoaderThreadFactory.class.getClassLoader()));
}
};
this.builder.threadPoolFactory(factory);
return this;
}
Aggregations