use of org.infinispan.configuration.global.GlobalConfigurationBuilder in project wildfly by wildfly.
the class JGroupsTransportServiceConfigurator method get.
@Override
public TransportConfiguration get() {
ChannelFactory factory = this.factory.get();
Properties properties = new Properties();
properties.put(JGroupsTransport.CHANNEL_CONFIGURATOR, new ChannelConfigurator(factory, this.containerName));
ProtocolStackConfiguration stack = factory.getProtocolStackConfiguration();
org.wildfly.clustering.jgroups.spi.TransportConfiguration.Topology topology = stack.getTransport().getTopology();
TransportConfigurationBuilder builder = new GlobalConfigurationBuilder().transport().clusterName(this.cluster.get()).distributedSyncTimeout(this.lockTimeout).transport(new JGroupsTransport()).withProperties(properties);
if (topology != null) {
builder.siteId(topology.getSite()).rackId(topology.getRack()).machineId(topology.getMachine());
}
return builder.create();
}
Aggregations