Search in sources :

Example 1 with ChannelConfigurator

use of org.jboss.as.clustering.infinispan.ChannelConfigurator 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();
}
Also used : ChannelConfigurator(org.jboss.as.clustering.infinispan.ChannelConfigurator) GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) JGroupsTransport(org.infinispan.remoting.transport.jgroups.JGroupsTransport) 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) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)1 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)1 TransportConfiguration (org.infinispan.configuration.global.TransportConfiguration)1 TransportConfigurationBuilder (org.infinispan.configuration.global.TransportConfigurationBuilder)1 JGroupsTransport (org.infinispan.remoting.transport.jgroups.JGroupsTransport)1 ChannelConfigurator (org.jboss.as.clustering.infinispan.ChannelConfigurator)1 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)1 ProtocolStackConfiguration (org.wildfly.clustering.jgroups.spi.ProtocolStackConfiguration)1