use of org.infinispan.configuration.global.TransportConfigurationBuilder in project wildfly by wildfly.
the class JGroupsTransportBuilder method getValue.
@Override
public TransportConfiguration getValue() {
ChannelFactory factory = this.factory.getValue();
ProtocolStackConfiguration stack = factory.getProtocolStackConfiguration();
org.wildfly.clustering.jgroups.spi.TransportConfiguration.Topology topology = stack.getTransport().getTopology();
TransportConfigurationBuilder builder = new GlobalConfigurationBuilder().transport().clusterName(this.containerName).distributedSyncTimeout(this.lockTimeout).transport(new ChannelFactoryTransport(factory));
if (topology != null) {
builder.siteId(topology.getSite()).rackId(topology.getRack()).machineId(topology.getMachine());
}
return builder.create();
}
use of org.infinispan.configuration.global.TransportConfigurationBuilder in project hibernate-orm by hibernate.
the class TestInfinispanRegionFactory method amendConfiguration.
protected void amendConfiguration(ConfigurationBuilderHolder holder) {
holder.getGlobalConfigurationBuilder().globalJmxStatistics().allowDuplicateDomains(true);
TransportConfigurationBuilder transport = holder.getGlobalConfigurationBuilder().transport();
transport.nodeName(TestResourceTracker.getNextNodeName());
transport.clusterName(TestResourceTracker.getCurrentTestName());
// minimize number of threads using unlimited cached thread pool
transport.remoteCommandThreadPool().threadPoolFactory(CachedThreadPoolExecutorFactory.create());
transport.transportThreadPool().threadPoolFactory(CachedThreadPoolExecutorFactory.create());
for (Map.Entry<String, ConfigurationBuilder> cfg : holder.getNamedConfigurationBuilders().entrySet()) {
amendCacheConfiguration(cfg.getKey(), cfg.getValue());
}
// disable simple cache for testing as we need to insert interceptors
if (!pendingPutsSimple) {
holder.getNamedConfigurationBuilders().get(InfinispanRegionFactory.DEF_PENDING_PUTS_RESOURCE).simpleCache(false);
}
}
Aggregations