Package org.jboss.cache

Examples of org.jboss.cache.UnitTestCacheFactory.createCache()


      conf.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);

      c1 = cf.createCache(conf, false, getClass());
      c2 = cf.createCache(conf.clone(), false, getClass());
      c3 = cf.createCache(conf.clone(), false, getClass());

      c1.start();
      c2.start();
View Full Code Here


      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);

      c1 = cf.createCache(conf, false, getClass());
      c2 = cf.createCache(conf.clone(), false, getClass());
      c3 = cf.createCache(conf.clone(), false, getClass());

      c1.start();
      c2.start();
      c3.start();
View Full Code Here

      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);

      c1 = cf.createCache(conf, false, getClass());
      c2 = cf.createCache(conf.clone(), false, getClass());
      c3 = cf.createCache(conf.clone(), false, getClass());

      c1.start();
      c2.start();
      c3.start();
View Full Code Here

      UnitTestCacheFactory ucf = new UnitTestCacheFactory();
      for (String aConfFile : getConfigFileNames())
      {
         System.out.println("Processing file: " + aConfFile);
         assert !appender.isFoundUnknownWarning();
         Cache cache = ucf.createCache(CONFIG_ROOT + "/" + aConfFile, false);
//         cache.stop();
         assert !appender.isFoundUnknownWarning();
      }
   }
View Full Code Here

   {
      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
      UnitTestCacheFactory cacheFactory2 = new UnitTestCacheFactory<Object, Object>();
      CacheSPI tmpCacheSPI = (CacheSPI) cacheFactory2.createCache(config, getClass());
      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

      UnitTestCacheFactory cacheFactory = new UnitTestCacheFactory<Object, Object>();
      config.setCustomInterceptors(interceptorConfig);
View Full Code Here

      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

      UnitTestCacheFactory cacheFactory = new UnitTestCacheFactory<Object, Object>();
      config.setCustomInterceptors(interceptorConfig);
      cache = (CacheSPI) cacheFactory.createCache(config, true, getClass());
   }
}
View Full Code Here

   protected CacheSPI createCache() throws Exception
   {
      UnitTestCacheFactory factory = new UnitTestCacheFactory();
      Configuration cfg = UnitTestConfigurationFactory.createConfiguration(CacheMode.LOCAL);
      cfg.setIsolationLevel(IsolationLevel.REPEATABLE_READ);     
      CacheSPI cache = (CacheSPI) factory.createCache(cfg, true, getClass());
      return cache;
   }

   public void testConcurrentUpdatesNoWriteSkew(Method m) throws Exception {
      final int nbWriters = 10;
View Full Code Here

         log.debug(m.getName());
         UnitTestCacheFactory factory = new UnitTestCacheFactory();
         Configuration cfg = UnitTestConfigurationFactory.createConfiguration(CacheMode.LOCAL);
         cfg.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
         cfg.setWriteSkewCheck(true);
         cache = (CacheSPI) factory.createCache(cfg, false, getClass());
         cache.start();        
         assert cache.getConfiguration().isWriteSkewCheck();
         init();
         CyclicBarrier barrier = new CyclicBarrier(nbWriters + 1);
         List<Future<Void>> futures = new ArrayList<Future<Void>>(nbWriters);
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.