Search in sources :

Example 1 with CompositeDependency

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

the class RemoteSiteConfigurationServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<RemoteSiteConfiguration> configuration = new CompositeDependency(this.cluster, this.factory).register(builder).provides(this.getServiceName());
    Service service = Service.newInstance(configuration, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : RemoteSiteConfiguration(org.wildfly.clustering.jgroups.spi.RemoteSiteConfiguration) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 2 with CompositeDependency

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

the class XAResourceRecoveryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<XAResourceRecovery> recovery = builder.provides(this.getServiceName());
    new CompositeDependency(this.cache, this.registry).register(builder);
    Service service = new FunctionalService<>(recovery, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) InfinispanXAResourceRecovery(org.jboss.as.clustering.infinispan.InfinispanXAResourceRecovery) XAResourceRecovery(org.jboss.tm.XAResourceRecovery) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 3 with CompositeDependency

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

the class GlobalConfigurationServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<GlobalConfiguration> global = new CompositeDependency(this.loader, this.modules, this.transport, this.server).register(builder).provides(this.getServiceName());
    for (Dependency dependency : this.pools.values()) {
        dependency.register(builder);
    }
    for (Dependency dependency : this.scheduledPools.values()) {
        dependency.register(builder);
    }
    Service service = new FunctionalService<>(global, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : GlobalConfiguration(org.infinispan.configuration.global.GlobalConfiguration) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) SupplierDependency(org.wildfly.clustering.service.SupplierDependency) ServiceSupplierDependency(org.wildfly.clustering.service.ServiceSupplierDependency) Dependency(org.wildfly.clustering.service.Dependency)

Example 4 with CompositeDependency

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

the class InfinispanBeanManagerFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    new CompositeDependency(this.cache, this.affinityFactory, this.repository, this.group, this.dispatcherFactory).register(builder);
    Consumer<BeanManagerFactory<I, T, TransactionBatch>> factory = builder.provides(this.getServiceName());
    Service service = Service.newInstance(factory, new InfinispanBeanManagerFactory<>(this));
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : BeanManagerFactory(org.wildfly.clustering.ejb.BeanManagerFactory) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 5 with CompositeDependency

use of org.wildfly.clustering.service.CompositeDependency 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);
}
Also used : Group(org.wildfly.clustering.group.Group) FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Aggregations

CompositeDependency (org.wildfly.clustering.service.CompositeDependency)29 Service (org.jboss.msc.Service)26 FunctionalService (org.wildfly.clustering.service.FunctionalService)20 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)10 ServiceName (org.jboss.msc.service.ServiceName)8 Dependency (org.wildfly.clustering.service.Dependency)5 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)5 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)5 ClientMapping (org.jboss.as.network.ClientMapping)2 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)2 UndertowService (org.wildfly.extension.undertow.UndertowService)2 ExecutorService (java.util.concurrent.ExecutorService)1 OpenAPI (org.eclipse.microprofile.openapi.models.OpenAPI)1 Cache (org.infinispan.Cache)1 Configuration (org.infinispan.client.hotrod.configuration.Configuration)1 ConnectionPoolConfiguration (org.infinispan.client.hotrod.configuration.ConnectionPoolConfiguration)1 ExecutorFactoryConfiguration (org.infinispan.client.hotrod.configuration.ExecutorFactoryConfiguration)1 SecurityConfiguration (org.infinispan.client.hotrod.configuration.SecurityConfiguration)1 Configuration (org.infinispan.configuration.cache.Configuration)1 GlobalConfiguration (org.infinispan.configuration.global.GlobalConfiguration)1