@Override public TransportConfiguration get() { ChannelFactory factory = this.factory.get(); 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 ChannelFactoryTransport(factory)) ; if (topology != null) { builder.siteId(topology.getSite()).rackId(topology.getRack()).machineId(topology.getMachine()); } return builder.create(); }
@Override public Address generateAddress() { ExtendedUUID uuid = ExtendedUUID.randomUUID(); uuid.put(SITE, Util.stringToBytes(this.topology.getSite())); uuid.put(RACK, Util.stringToBytes(this.topology.getRack())); uuid.put(MACHINE, Util.stringToBytes(this.topology.getMachine())); return uuid; } }
@Override public TransportConfiguration get() { ChannelFactory factory = this.factory.get(); 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 ChannelFactoryTransport(factory)) ; if (topology != null) { builder.siteId(topology.getSite()).rackId(topology.getRack()).machineId(topology.getMachine()); } return builder.create(); }
@Override public Address generateAddress() { ExtendedUUID uuid = ExtendedUUID.randomUUID(); uuid.put(SITE, Util.stringToBytes(this.topology.getSite())); uuid.put(RACK, Util.stringToBytes(this.topology.getRack())); uuid.put(MACHINE, Util.stringToBytes(this.topology.getMachine())); return uuid; } }