Search in sources :

Example 36 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class CacheServiceConfigurator method build.

@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    Consumer<Cache<K, V>> cache = new CompositeDependency(this.configuration, this.container, this.dependency).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(cache, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) Cache(org.infinispan.Cache)

Example 37 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class AbstractProtocolConfigurationServiceConfigurator method build.

@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<C> configuration = this.register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(configuration, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Example 38 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class ConfigurationServiceConfigurator method build.

@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<Configuration> configuration = new CompositeDependency(this.container, this.dependency).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(configuration, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : Configuration(org.infinispan.configuration.cache.Configuration) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 39 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class AbstractLocalGroupServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    this.environment = builder.requires(ServerEnvironmentService.SERVICE_NAME);
    Consumer<Group> group = builder.provides(this.getServiceName());
    Service service = new FunctionalService<>(group, this, this.environment);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : Group(org.wildfly.clustering.group.Group) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) ServerEnvironmentService(org.jboss.as.server.ServerEnvironmentService)

Example 40 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class HotRodSessionManagerFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    this.cacheConfigurator.build(target).install();
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<SessionManagerFactory<SC, LC, TransactionBatch>> factory = this.cache.register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(factory, Function.identity(), this, Consumers.close());
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) SessionManagerFactory(org.wildfly.clustering.web.session.SessionManagerFactory) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Aggregations

Service (org.jboss.msc.Service)46 FunctionalService (org.wildfly.clustering.service.FunctionalService)46 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)20 ServiceName (org.jboss.msc.service.ServiceName)12 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)12 Dependency (org.wildfly.clustering.service.Dependency)5 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)5 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)5 Group (org.wildfly.clustering.group.Group)3 RouteLocator (org.wildfly.clustering.web.routing.RouteLocator)3 ClientMapping (org.jboss.as.network.ClientMapping)2 SessionIdentifierCodec (org.jboss.as.web.session.SessionIdentifierCodec)2 ModClusterService (org.jboss.modcluster.ModClusterService)2 ServiceProviderRegistry (org.wildfly.clustering.provider.ServiceProviderRegistry)2 CommandDispatcherFactory (org.wildfly.clustering.spi.dispatcher.CommandDispatcherFactory)2 SessionManagerFactory (org.wildfly.clustering.web.session.SessionManagerFactory)2 SessionManagerFactory (io.undertow.servlet.api.SessionManagerFactory)1 ExecutorService (java.util.concurrent.ExecutorService)1 OpenAPI (org.eclipse.microprofile.openapi.models.OpenAPI)1 Cache (org.infinispan.Cache)1