@Override public TransportConfiguration get() { return new GlobalConfigurationBuilder().transport().transport(null).create(); } }
builder.transport().transport(transport.transport()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .clusterName(transport.clusterName())
@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(); }
builder.transport().transport(transport.transport()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .clusterName(transport.clusterName())
@Override public void start() { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); // WFLY-6685 Prevent Infinispan from registering channel mbeans // The JGroups subsystem already does this builder.globalJmxStatistics().read(this.configuration.globalJmxStatistics()).disable(); // ISPN-4755 workaround TransportConfiguration transport = this.configuration.transport(); builder.transport() .clusterName(transport.clusterName()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .initialClusterSize(transport.initialClusterSize()) .initialClusterTimeout(transport.initialClusterTimeout(), TimeUnit.MILLISECONDS) .machineId(transport.machineId()) .nodeName(transport.nodeName()) .rackId(transport.rackId()) .siteId(transport.siteId()) .transport(transport.transport()) .withProperties(transport.properties()) ; this.configuration = builder.build(); super.start(); }
org.infinispan.configuration.global.TransportConfigurationBuilder transportBuilder = builder.transport() .clusterName(this.name) .transport(new ChannelTransport(transport.getChannel(), transport.getChannelFactory())) .distributedSyncTimeout(transport.getLockTimeout())
@Override public TransportConfiguration get() { return new GlobalConfigurationBuilder().transport().transport(null).create(); } }
builder.transport().transport(null); } else {
.nodeName(nodeName) .siteId(siteName) .transport(transport) .globalJmxStatistics() .jmxDomain(InfinispanConnectionProvider.JMX_DOMAIN + "-" + nodeName)
builder.transport().transport(Util.<Transport>getInstance(value, holder.getClassLoader())); break;
@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(); }
protected EmbeddedCacheManager addClusterEnabledCacheManager(TransportFlags flags, GlobalConfigurationBuilder gcb, ConfigurationBuilder builder) { GlobalConfigurationBuilder clone = GlobalConfigurationBuilder.defaultClusteredBuilder(); //get the transport here as clone.read below would inject the same transport reference into the clone // which we don't want Transport transport = clone.transport().getTransport(); Marshaller marshaller = clone.serialization().getMarshaller(); clone.read(gcb.build()); clone.transport().transport(transport); clone.serialization().marshaller(marshaller); clone.transport().clusterName("ISPN(SITE " + siteName + ")"); EmbeddedCacheManager cm = TestCacheManagerFactory.createClusteredCacheManager(clone, builder, flags); cacheManagers.add(cm); return cm; }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cb = new ConfigurationBuilder(); chf = new ControlledConsistentHashFactory.Scattered(new int[] {0, 1, 2}); cb.clustering().cacheMode(CacheMode.SCATTERED_SYNC).hash().numSegments(3).consistentHashFactory(chf); if (biasAcquisition != null) { cb.clustering().biasAcquisition(biasAcquisition); } addClusterEnabledCacheManager(cb); // If the updated topologies from old coord come when it's no longer in the view these are ignored. // Therefore we have to delay the view. viewLatch = new CountDownLatch(1); GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); gcb.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(gcb, cb); // we need distinct transport instances on manager(1) and (2) gcb.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(gcb, cb); assertTrue(cache(0).getCacheManager().isCoordinator()); // start other caches cache(1); cache(2); waitForClusterToForm(); }
@Override protected void createCacheManagers() throws Throwable { cfgBuilder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true); cfgBuilder.transaction().transactionManagerLookup(new EmbeddedTransactionManagerLookup()); cfgBuilder.clustering().hash().numOwners(2); cfgBuilder.clustering().stateTransfer().fetchInMemoryState(true); cfgBuilder.clustering().stateTransfer().timeout(20000); gcfgBuilder = new GlobalConfigurationBuilder(); gcfgBuilder.transport().transport(mockTransport); }
@Override public void start() { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); // WFLY-6685 Prevent Infinispan from registering channel mbeans // The JGroups subsystem already does this builder.globalJmxStatistics().read(this.configuration.globalJmxStatistics()).disable(); // ISPN-4755 workaround TransportConfiguration transport = this.configuration.transport(); builder.transport() .clusterName(transport.clusterName()) .distributedSyncTimeout(transport.distributedSyncTimeout()) .initialClusterSize(transport.initialClusterSize()) .initialClusterTimeout(transport.initialClusterTimeout(), TimeUnit.MILLISECONDS) .machineId(transport.machineId()) .nodeName(transport.nodeName()) .rackId(transport.rackId()) .siteId(transport.siteId()) .transport(transport.transport()) .withProperties(transport.properties()) ; this.configuration = builder.build(); super.start(); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder configuration = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); configuration.locking() .useLockStriping(false) .isolationLevel(IsolationLevel.READ_COMMITTED) .lockAcquisitionTimeout(20000); configuration.transaction() .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .lockingMode(LockingMode.PESSIMISTIC) .useSynchronization(false) .recovery() .disable(); configuration.clustering() .hash() .numSegments(60) .stateTransfer() .fetchInMemoryState(false); viewLatch = new CountDownLatch(1); GlobalConfigurationBuilder global = new GlobalConfigurationBuilder(); global.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(global, configuration); addClusterEnabledCacheManager(configuration); addClusterEnabledCacheManager(configuration); }
gcb2.transport().transport(new JGroupsTransport() { @Override public <T> CompletionStage<T> invokeCommand(Address target, ReplicableCommand command,
GlobalConfigurationBuilder gbuilder = GlobalConfigurationBuilder.defaultClusteredBuilder(); Transport transport = gbuilder.transport().getTransport(); gbuilder.transport().transport(transport); gbuilder.transport().clusterName("test"); startHotRodServer(gbuilder, defaultBuilder, j + 1);