Source:
<code>public Configuration getValue() { ConfigurationBuilder builder = new ConfigurationBuilder() .connectionTimeout(this.connectionTimeout) <START> .keySizeEstimate(this.keySizeEstimate) <END> .maxRetries(this.maxRetries) .version(ProtocolVersion.parseVersion(this.protocolVersion)) .socketTimeout(this.socketTimeout) .tcpNoDelay(this.tcpNoDelay) .tcpKeepAlive(this.tcpKeepAlive) .valueSizeEstimate(this.valueSizeEstimate); builder.connectionPool().read(this.connectionPool.getValue()); builder.nearCache().read(this.nearCache.getValue()); builder.asyncExecutorFactory().read(this.threadPools.get(ThreadPoolResourceDefinition.CLIENT).getValue()); for (Map.Entry<String, List<InjectedValueDependency<OutboundSocketBinding>>> cluster : this.clusters.entrySet()) { String clusterName = cluster.getKey(); List<InjectedValueDependency<OutboundSocketBinding>> injectedValueDependencies = cluster.getValue(); if (this.defaultRemoteCluster.equals(clusterName)) { for (InjectedValueDependency<OutboundSocketBinding> bindingInjectedValueDependency : injectedValueDependencies) { OutboundSocketBinding binding = bindingInjectedValueDependency.getValue(); try { builder.addServer().host(binding.getResolvedDestinationAddress().getHostAddress()).port(binding.getDestinationPort()); } catch (UnknownHostException e) { throw InfinispanLogger.ROOT_LOGGER.failedToInjectSocketBinding(e, binding); } } } else { ClusterConfigurationBuilder clusterConfigurationBuilder = builder.addCluster(clusterName); for (InjectedValueDependency<OutboundSocketBinding> bindingInjectedValueDependency : injectedValueDependencies) { OutboundSocketBinding binding = bindingInjectedValueDependency.getValue(); try { clusterConfigurationBuilder.addClusterNode(binding.getResolvedDestinationAddress().getHostAddress(), binding.getDestinationPort()); } catch (UnknownHostException e) { throw InfinispanLogger.ROOT_LOGGER.failedToInjectSocketBinding(e, binding); } } } } return builder.build(); }</code><technical_language>Additionally, need configure Marshaller. Similiar is done here: <LINK_0> a ModularClassResolver</technical_language>

Target:
public Configuration getValue() { ConfigurationBuilder builder = new ConfigurationBuilder() .marshaller(new HotRodMarshaller(this.module.getValue())) .connectionTimeout(this.connectionTimeout) .keySizeEstimate(this.keySizeEstimate) .maxRetries(this.maxRetries) .version(ProtocolVersion.parseVersion(this.protocolVersion)) .socketTimeout(this.socketTimeout) .tcpNoDelay(this.tcpNoDelay) .tcpKeepAlive(this.tcpKeepAlive) .valueSizeEstimate(this.valueSizeEstimate); builder.connectionPool().read(this.connectionPool.getValue()); builder.nearCache().read(this.nearCache.getValue()); builder.asyncExecutorFactory().read(this.threadPools.get(ThreadPoolResourceDefinition.CLIENT).getValue()); for (Map.Entry<String, List<InjectedValueDependency<OutboundSocketBinding>>> cluster : this.clusters.entrySet()) { String clusterName = cluster.getKey(); List<InjectedValueDependency<OutboundSocketBinding>> injectedValueDependencies = cluster.getValue(); if (this.defaultRemoteCluster.equals(clusterName)) { for (InjectedValueDependency<OutboundSocketBinding> bindingInjectedValueDependency : injectedValueDependencies) { OutboundSocketBinding binding = bindingInjectedValueDependency.getValue(); builder.addServer().host(binding.getUnresolvedDestinationAddress()).port(binding.getDestinationPort()); } } else { ClusterConfigurationBuilder clusterConfigurationBuilder = builder.addCluster(clusterName); for (InjectedValueDependency<OutboundSocketBinding> bindingInjectedValueDependency : injectedValueDependencies) { OutboundSocketBinding binding = bindingInjectedValueDependency.getValue(); clusterConfigurationBuilder.addClusterNode(binding.getUnresolvedDestinationAddress(), binding.getDestinationPort()); } } } return builder.build(); }