Package org.jboss.cache

Examples of org.jboss.cache.UnitTestCacheFactory


   private void doTest(NodeLockingScheme nls, boolean set)
   {
      Cache c = null;
      try
      {
         c = new UnitTestCacheFactory().createCache(false, getClass());
         c.getConfiguration().setNodeLockingScheme(nls);
         c.getConfiguration().setLockParentForChildInsertRemove(set);
         if (nls.isVersionedScheme())
            c.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
         c.start();
View Full Code Here


   @BeforeClass
   public void beforeTest()
   {
//      System.out.println("Base.beforeTest");
      Configuration config = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC, true);
      cache = new UnitTestCacheFactory().createCache(config, true, getClass());
      System.out.println("Other:::" + cache.getConfiguration().getClusterConfig());
   }
View Full Code Here

   @BeforeClass
   public void beforeTest()
   {
//      System.out.println("Base.beforeTest");
      Configuration config = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC, true);
      cache = new UnitTestCacheFactory().createCache(config, true, getClass());
      System.out.println("Base:::" + cache.getConfiguration().getClusterConfig());
   }
View Full Code Here

   final ExecutorService executorService = Executors.newCachedThreadPool();
  
   @Override
   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;
   }
View Full Code Here

   public void testConcurrentUpdatesWriteSkew(Method m) throws Exception {
      final int nbWriters = 10;
      CacheSPI cache = null;
      try {
         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

   {
      Cache cache = null;
      try
      {
         c.getEvictionConfig().setWakeupInterval(0);
         cache = new UnitTestCacheFactory().createCache(c, getClass());

         EvictionRegionConfig erc = cache.getRegion(Fqn.ROOT, false).getEvictionRegionConfig();
         assert erc.getEvictionAlgorithmConfig() instanceof FIFOAlgorithmConfig;
         assert erc.getEvictionActionPolicyClassName().equals(DefaultEvictionActionPolicy.class.getName());
View Full Code Here

TOP

Related Classes of org.jboss.cache.UnitTestCacheFactory

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.