use of org.wildfly.clustering.service.concurrent.CachedThreadPoolExecutorServiceBuilder in project wildfly by wildfly.
the class InfinispanBeanManagerFactoryBuilderFactory method getDeploymentBuilders.
@Override
public Collection<CapabilityServiceBuilder<?>> getDeploymentBuilders(final ServiceName name) {
String cacheName = getCacheName(name);
String containerName = this.config.getContainerName();
String templateCacheName = this.config.getCacheName();
List<CapabilityServiceBuilder<?>> builders = new ArrayList<>(4);
builders.add(new TemplateConfigurationBuilder(ServiceName.parse(InfinispanCacheRequirement.CONFIGURATION.resolve(containerName, cacheName)), containerName, cacheName, templateCacheName));
builders.add(new CacheBuilder<Object, Object>(ServiceName.parse(InfinispanCacheRequirement.CACHE.resolve(containerName, cacheName)), containerName, cacheName) {
@Override
public ServiceBuilder<Cache<Object, Object>> build(ServiceTarget target) {
return super.build(target).addDependency(name.append("marshalling"));
}
});
builders.add(new BuilderAdapter<>(new RemoveOnCancelScheduledExecutorServiceBuilder(name.append(this.name, "expiration"), EXPIRATION_THREAD_FACTORY)));
builders.add(new BuilderAdapter<>(new CachedThreadPoolExecutorServiceBuilder(name.append(this.name, "eviction"), EVICTION_THREAD_FACTORY)));
return builders;
}
Aggregations