Package org.infinispan.config

Examples of org.infinispan.config.GlobalConfiguration$SerializationConfig


      config.setUseLockStriping(false); // reduces the odd chance of a key collision and deadlock
   }

   protected EmbeddedCacheManager createCacheManager() {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager();
      GlobalConfiguration gc = cm.getGlobalConfiguration();
      Properties p = new Properties();
      p.setProperty("maxThreads", "25");
      gc.setAsyncTransportExecutorProperties(p);
      cm.defineConfiguration(cacheName, config.clone());
      return cm;
   }
View Full Code Here


      registrator.setJmxDomain(JMX_DOMAIN);
      return registrator;
   }

   public void testRegisterReplicatedCache() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.setAllowDuplicateDomains(true);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      cacheContainers.add(cm);
      cm.start();
      Configuration configurationOverride = config();
      configurationOverride.setCacheMode(Configuration.CacheMode.REPL_SYNC);
View Full Code Here

      regComponents.unregisterMBeans();
      assert !mBeanServer.isRegistered(name1);
   }

   public void testLocalAndReplicatedCache() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.setAllowDuplicateDomains(true);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      cacheContainers.add(cm);
      cm.start();
      Configuration replicated = config();
      Configuration local = config();
View Full Code Here

   private ObjectName lockManagerObjName;
   private MBeanServer threadMBeanServer;
   private static final String JMX_DOMAIN = "MvccLockManagerMBeanTest";

   protected EmbeddedCacheManager createCacheManager() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getNonClusteredDefault().fluent()
            .globalJmxStatistics()
               .mBeanServerLookupClass(PerThreadMBeanServerLookup.class)
               .jmxDomain(JMX_DOMAIN)
            .build();
View Full Code Here

   private static final int REPL_QUEUE_INTERVAL = 5000;
   private static final int REPL_QUEUE_MAX_ELEMENTS = 10;
   long creationTime;

   protected void createCacheManagers() throws Throwable {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.setReplicationQueueScheduledExecutorFactoryClass(ReplQueueTestScheduledExecutorFactory.class.getName());
      globalConfiguration.setReplicationQueueScheduledExecutorProperties(ReplQueueTestScheduledExecutorFactory.myProps);
      CacheContainer first = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      CacheContainer second = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      registerCacheManager(first, second);

      Configuration config = getDefaultClusteredConfig(Configuration.CacheMode.REPL_ASYNC, true);
View Full Code Here

      EmbeddedCacheManager cm1 = null, cm2 = null;
      try {
         Configuration c = new Configuration();
         c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
         c.fluent().transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL);
         GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
         gc.setStrictPeerToPeer(strict);

         cm1 = TestCacheManagerFactory.createCacheManager(gc, c);
         cm2 = TestCacheManagerFactory.createCacheManager(gc, c);

         cm1.getCache();
View Full Code Here

   private static final String JMX_DOMAIN = "tx.recovery.admin.LocalCacheRecoveryAdminTest";
   private DummyTransaction tx1;

   @Override
   protected void createCacheManagers() throws Throwable {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.fluent()
            .globalJmxStatistics()
            .mBeanServerLookup(new PerThreadMBeanServerLookup())
            .jmxDomain(JMX_DOMAIN).allowDuplicateDomains(true);
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true).fluent()
            .transaction().transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class).recovery()
View Full Code Here

      try {
         Configuration c = new Configuration().fluent()
               .mode(Configuration.CacheMode.DIST_SYNC)
               .hash().numOwners(3)
               .build();
         GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();

         cm1 = TestCacheManagerFactory.createCacheManager(gc, c);
         cm2 = TestCacheManagerFactory.createCacheManager(gc, c);
         cm3 = TestCacheManagerFactory.createCacheManager(gc, c);
View Full Code Here

         channel2.close();
      }
   }

   private Channel createJGroupsChannel(GlobalConfiguration gc) {
      GlobalConfiguration newGC = gc.clone();
      TestCacheManagerFactory.amendTransport(newGC);
      Properties p = newGC.getTransportProperties();
      String jgroupsCfg = p.getProperty(JGroupsTransport.CONFIGURATION_STRING);
      try {
         JChannel channel = new JChannel(jgroupsCfg);
         channel.setName(newGC.getTransportNodeName());
         channel.connect(newGC.getClusterName());
         return channel;
      } catch (Exception e) {
         throw new CacheException(e);
      }
   }
View Full Code Here

   public void tearDown() {
      if (caches != null) TestingUtil.killCacheManagers(cacheContainers);
   }

   private Cache getCache() {
      GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();

      Configuration c = new Configuration();
      c.setInvocationBatchingEnabled(true);
      c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      c.setSyncReplTimeout(30000);
View Full Code Here

TOP

Related Classes of org.infinispan.config.GlobalConfiguration$SerializationConfig

Copyright © 2018 www.massapicom. 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.