Package org.infinispan.configuration.global

Examples of org.infinispan.configuration.global.GlobalConfiguration.transport()


      assertEquals("ReplicationQueueThread", replicationQueueThreadFactory.threadNamePattern());

      assertTrue(gc.transport().transport() instanceof JGroupsTransport);
      assertEquals("infinispan-cluster", gc.transport().clusterName());
      // Should be "Jalapeno" but it's overriden by the test cache manager factory
      assertTrue(gc.transport().nodeName().contains("Node"));
      assertEquals(50000, gc.transport().distributedSyncTimeout());

      assertEquals(ShutdownHookBehavior.REGISTER, gc.shutdown().hookBehavior());

      assertTrue(gc.serialization().marshaller() instanceof VersionAwareMarshaller);
View Full Code Here


      assertTrue(gc.transport().transport() instanceof JGroupsTransport);
      assertEquals("infinispan-cluster", gc.transport().clusterName());
      // Should be "Jalapeno" but it's overriden by the test cache manager factory
      assertTrue(gc.transport().nodeName().contains("Node"));
      assertEquals(50000, gc.transport().distributedSyncTimeout());

      assertEquals(ShutdownHookBehavior.REGISTER, gc.shutdown().hookBehavior());

      assertTrue(gc.serialization().marshaller() instanceof VersionAwareMarshaller);
      assertEquals(Version.getVersionShort("1.0"), gc.serialization().version());
View Full Code Here

   private Channel createJGroupsChannel(GlobalConfiguration oldGC) {
      GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder().read(oldGC);
      TestCacheManagerFactory.amendTransport(builder);
      GlobalConfiguration gc = builder.build();
      Properties p = gc.transport().properties();
      String jgroupsCfg = p.getProperty(JGroupsTransport.CONFIGURATION_STRING);
      try {
         JChannel channel = new JChannel(jgroupsCfg);
         channel.setName(gc.transport().nodeName());
         channel.connect(gc.transport().clusterName());
View Full Code Here

      GlobalConfiguration gc = builder.build();
      Properties p = gc.transport().properties();
      String jgroupsCfg = p.getProperty(JGroupsTransport.CONFIGURATION_STRING);
      try {
         JChannel channel = new JChannel(jgroupsCfg);
         channel.setName(gc.transport().nodeName());
         channel.connect(gc.transport().clusterName());
         return channel;
      } catch (Exception e) {
         throw new CacheException(e);
      }
View Full Code Here

      Properties p = gc.transport().properties();
      String jgroupsCfg = p.getProperty(JGroupsTransport.CONFIGURATION_STRING);
      try {
         JChannel channel = new JChannel(jgroupsCfg);
         channel.setName(gc.transport().nodeName());
         channel.connect(gc.transport().clusterName());
         return channel;
      } catch (Exception e) {
         throw new CacheException(e);
      }
   }
View Full Code Here

         cm = TestCacheManagerFactory.fromStream(is);

         GlobalConfiguration gc = cm.getCacheManagerConfiguration();
         Configuration defaultCfg = cm.getCache().getCacheConfiguration();

         assert gc.transport().transport() != null;
         assert defaultCfg.clustering().cacheMode() == CacheMode.REPL_SYNC;

         Configuration cfg = cm.getCache("local").getCacheConfiguration();
         assert cfg.clustering().cacheMode() == CacheMode.LOCAL;
View Full Code Here

                        configureCacheManager(configBuilder);
                        GlobalConfiguration gc = configBuilder.build();

                        // Check if a CacheManager with the same GlobalConfiguration exists
                        DefaultCacheManager currentCacheManager =
                           mappingGlobalConfigCacheManager.get(gc.transport().clusterName());
                        if (currentCacheManager == null)
                        {
                           // Use a different cache manager name to prevent naming conflict
                           configBuilder.globalJmxStatistics().cacheManagerName(
                              gc.globalJmxStatistics().cacheManagerName() + "_" + region + "_" + ctx.getName());
View Full Code Here

                           {
                              currentCacheManager.defineConfiguration(entry.getKey(), entry.getValue().build());
                           }
                           currentCacheManager.start();
                           // We register this new cache manager
                           mappingGlobalConfigCacheManager.put(gc.transport().clusterName(), currentCacheManager);
                        }
                        return currentCacheManager;
                     }
                  });
            }
View Full Code Here

               assert globalConfig.asyncListenerExecutor().properties().get("queueSize").equals("1020000");
               assert !defaultConfig.invocationBatching().enabled();
               assert globalConfig.serialization().marshaller().getClass().equals(VersionAwareMarshaller.class);
               assert defaultConfig.storeAsBinary().enabled();

               assert globalConfig.transport().clusterName().equals("JBossCache-cluster");
               assert defaultConfig.clustering().cacheMode().equals(CacheMode.INVALIDATION_SYNC);
               assert defaultConfig.clustering().stateTransfer().timeout() == 2120000;

               assert defaultConfig.clustering().sync().replTimeout() == 22220000;
               assert defaultConfig.eviction().strategy() == EvictionStrategy.LRU;
View Full Code Here

         @Override
         public void call() {
            GlobalConfiguration globalCfg = cm.getCacheManagerConfiguration();

            assertTrue(globalCfg.transport().transport() instanceof JGroupsTransport);
            assertEquals("demoCluster", globalCfg.transport().clusterName());

            Configuration cfg = cm.getDefaultCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, cfg.clustering().cacheMode());
         }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.