Search in sources :

Example 1 with TimeScheduler3

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)));
}
Also used : ClassLoaderThreadFactory(org.jboss.as.clustering.jgroups.ClassLoaderThreadFactory) ThreadFactory(org.jgroups.util.ThreadFactory) LazyThreadFactory(org.jgroups.util.LazyThreadFactory) LazyThreadFactory(org.jgroups.util.LazyThreadFactory) JChannelFactory(org.jboss.as.clustering.jgroups.JChannelFactory) TimeScheduler3(org.jgroups.util.TimeScheduler3) ClassLoaderThreadFactory(org.jboss.as.clustering.jgroups.ClassLoaderThreadFactory) ImmediateValue(org.jboss.msc.value.ImmediateValue)

Aggregations

ClassLoaderThreadFactory (org.jboss.as.clustering.jgroups.ClassLoaderThreadFactory)1 JChannelFactory (org.jboss.as.clustering.jgroups.JChannelFactory)1 ImmediateValue (org.jboss.msc.value.ImmediateValue)1 LazyThreadFactory (org.jgroups.util.LazyThreadFactory)1 ThreadFactory (org.jgroups.util.ThreadFactory)1 TimeScheduler3 (org.jgroups.util.TimeScheduler3)1