use of org.wildfly.clustering.singleton.service.SingletonServiceConfiguratorFactory in project wildfly by wildfly.
the class LocalSingletonServiceConfiguratorFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SingletonServiceConfiguratorFactory> factory = builder.provides(this.getServiceName());
Service service = Service.newInstance(factory, new LocalSingletonServiceBuilderFactory(this));
return builder.setInstance(service);
}
use of org.wildfly.clustering.singleton.service.SingletonServiceConfiguratorFactory in project wildfly by wildfly.
the class CacheSingletonServiceConfiguratorFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SingletonServiceConfiguratorFactory> factory = builder.provides(this.getServiceName());
@SuppressWarnings("deprecation") Service service = Service.newInstance(factory, new DistributedSingletonServiceBuilderFactory(this));
return builder.setInstance(service);
}
Aggregations