Search in sources :

Example 1 with ChannelFactoryTransport

use of org.jboss.as.clustering.infinispan.ChannelFactoryTransport 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();
}
Also used : GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) TransportConfigurationBuilder(org.infinispan.configuration.global.TransportConfigurationBuilder) ProtocolStackConfiguration(org.wildfly.clustering.jgroups.spi.ProtocolStackConfiguration) TransportConfiguration(org.infinispan.configuration.global.TransportConfiguration) ChannelFactory(org.wildfly.clustering.jgroups.spi.ChannelFactory) ChannelFactoryTransport(org.jboss.as.clustering.infinispan.ChannelFactoryTransport)

Aggregations

GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)1 TransportConfiguration (org.infinispan.configuration.global.TransportConfiguration)1 TransportConfigurationBuilder (org.infinispan.configuration.global.TransportConfigurationBuilder)1 ChannelFactoryTransport (org.jboss.as.clustering.infinispan.ChannelFactoryTransport)1 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)1 ProtocolStackConfiguration (org.wildfly.clustering.jgroups.spi.ProtocolStackConfiguration)1