use of org.jgroups.util.TimeScheduler3 in project wildfly by wildfly.
the class TimerFactoryBuilder method build.
@Override
public ServiceBuilder<TimerFactory> build(ServiceTarget target) {
ThreadFactory threadFactory = new ClassLoaderThreadFactory(new LazyThreadFactory(this.getThreadGroupPrefix(), true, true), JChannelFactory.class.getClassLoader());
TimerFactory factory = () -> new TimeScheduler3(threadFactory, this.getMinThreads(), this.getMaxThreads(), this.getKeepAliveTime(), this.getQueueLength(), "abort");
return target.addService(this.getServiceName(), new ValueService<>(new ImmediateValue<>(factory)));
}
Aggregations