@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.registryServiceName = ClusteringCacheRequirement.SERVICE_PROVIDER_REGISTRY.getServiceName(support, this.containerName, this.cacheName); this.dispatcherFactoryServiceName = ClusteringRequirement.COMMAND_DISPATCHER_FACTORY.getServiceName(support, this.containerName); return this; }
@Override public List<Node> getMembers() { List<Node> members = new ArrayList<>(this.addresses.size()); for (Address address : this.addresses) { members.add(this.factory.createNode(address)); } return members; } }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.cacheName)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.factory = new ServiceSupplierDependency<>(ClusteringRequirement.COMMAND_DISPATCHER_FACTORY.getServiceName(support, this.group)); return this; }
public RouteRegistryEntryProviderBuilder(String serverName, SupplierDependency<String> route) { super(ServiceName.parse(ClusteringCacheRequirement.REGISTRY_ENTRY.resolve(InfinispanSessionManagerFactoryServiceConfigurator.DEFAULT_CACHE_CONTAINER, serverName))); this.route = route; }
@Override public Collection<CapabilityServiceConfigurator> getServiceConfigurators(ServiceNameRegistry<ClusteringCacheRequirement> registry, String containerName, String cacheName, String targetCacheName) { return Collections.singleton(new IdentityLegacyCapabilityServiceConfigurator<>(registry.getServiceName(ClusteringCacheRequirement.SINGLETON_SERVICE_BUILDER_FACTORY), SingletonServiceBuilderFactory.class, ClusteringCacheRequirement.SINGLETON_SERVICE_BUILDER_FACTORY, containerName, targetCacheName)); }
@Override public ServiceConfigurator configure(OperationContext context) { this.name = ClusteringCacheRequirement.REGISTRY_ENTRY.getServiceName(context, this.clientMappingsClusterName, BeanManagerFactoryServiceConfiguratorConfiguration.CLIENT_MAPPINGS_CACHE_NAME); this.group = new ServiceSupplierDependency<>(ClusteringRequirement.GROUP.getServiceName(context, this.clientMappingsClusterName)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.factory = new ServiceSupplierDependency<>(ClusteringCacheRequirement.REGISTRY_FACTORY.getServiceName(support, this.containerName, this.cacheName)); this.entry = new ServiceSupplierDependency<>(ClusteringCacheRequirement.REGISTRY_ENTRY.getServiceName(support, this.containerName, this.cacheName)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.group = new ServiceSupplierDependency<>(ClusteringRequirement.GROUP.getServiceName(support, this.groupName)); return this; }
@Override public Node getCoordinator() { return this.factory.createNode(this.view.getCoord()); }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.cache = new ServiceSupplierDependency<>(InfinispanCacheRequirement.CACHE.getServiceName(support, this.containerName, this.cacheName)); this.dispatcherFactory = new ServiceSupplierDependency<>(ClusteringRequirement.COMMAND_DISPATCHER_FACTORY.getServiceName(support, this.containerName)); this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.cacheName)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.cacheName)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.cache = new ServiceSupplierDependency<>(InfinispanCacheRequirement.CACHE.getServiceName(support, this.containerName, this.cacheName)); this.factory = new ServiceSupplierDependency<>(ClusteringRequirement.GROUP.getServiceName(support, this.containerName)); return this; }
@Override public Node getCoordinator() { return this.factory.createNode(this.getCoordinatorAddress()); }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.configurationConfigurator.configure(support); this.cacheConfigurator.configure(support); this.affinityFactory = new ServiceSupplierDependency<>(InfinispanRequirement.KEY_AFFINITY_FACTORY.getServiceName(support, this.containerName)); this.dispatcherFactory = new ServiceSupplierDependency<>(ClusteringRequirement.COMMAND_DISPATCHER_FACTORY.getServiceName(support, this.containerName)); this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.configuration.getServerName())); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.factory = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.serverName)); this.registry = new ServiceSupplierDependency<>(ClusteringCacheRequirement.REGISTRY.getServiceName(support, this.containerName, this.serverName)); this.cache = new ServiceSupplierDependency<>(InfinispanCacheRequirement.CACHE.getServiceName(support, this.containerName, this.deploymentName)); return this; }
@Override public Node createNode(Address address) { return this.nodeFactory.createNode(toJGroupsAddress(address)); }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { String containerName = this.configuration.getContainerName(); ServiceName deploymentUnitServiceName = this.context.getDeploymentUnitServiceName(); this.cache = new ServiceSupplierDependency<>(InfinispanCacheRequirement.CACHE.getServiceName(support, containerName, InfinispanBeanManagerFactoryServiceConfiguratorFactory.getCacheName(deploymentUnitServiceName, this.name))); this.affinityFactory = new ServiceSupplierDependency<>(InfinispanRequirement.KEY_AFFINITY_FACTORY.getServiceName(support, containerName)); this.dispatcherFactory = new ServiceSupplierDependency<>(ClusteringRequirement.COMMAND_DISPATCHER_FACTORY.getServiceName(support, containerName)); this.registry = new ServiceSupplierDependency<>(ClusteringCacheRequirement.REGISTRY.getServiceName(support, containerName, BeanManagerFactoryServiceConfiguratorConfiguration.CLIENT_MAPPINGS_CACHE_NAME)); this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, containerName, BeanManagerFactoryServiceConfiguratorConfiguration.CLIENT_MAPPINGS_CACHE_NAME)); return this; }
@Override public ServiceConfigurator configure(CapabilityServiceSupport support) { this.cache = new ServiceSupplierDependency<>(InfinispanCacheRequirement.CACHE.getServiceName(support, this.containerName, this.cacheName)); this.group = new ServiceSupplierDependency<>(ClusteringCacheRequirement.GROUP.getServiceName(support, this.containerName, this.cacheName)); return this; }
@Override public List<Node> getMembers() { List<Node> members = new ArrayList<>(this.view.size()); for (Address address : this.view.getMembersRaw()) { members.add(this.factory.createNode(address)); } return members; }