use of org.wildfly.clustering.infinispan.spi.affinity.DefaultKeyAffinityServiceFactory in project wildfly by wildfly.
the class KeyAffinityServiceFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<KeyAffinityServiceFactory> affinityFactory = builder.provides(name);
Service service = Service.newInstance(affinityFactory, new DefaultKeyAffinityServiceFactory());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations