use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class RemoteCacheServiceConfigurator method build.
@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<RemoteCache<K, V>> cache = this.container.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(cache, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class IdentityCapabilityServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<T> consumer = this.requirement.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(consumer, Function.identity(), this.requirement);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class CacheGroupServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = new AsyncServiceConfigurator(name).build(target);
Consumer<Group> group = new CompositeDependency(this.cache, this.factory).register(builder).provides(name);
Service service = new FunctionalService<>(group, Functions.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class ChannelGroupServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<Group> group = this.factory.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(group, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class SessionManagementServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<DistributableSessionManagementProvider> provider = this.factory.register(builder).provides(name);
Service service = new FunctionalService<>(provider, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations