Package org.jboss.cache

Examples of org.jboss.cache.CacheSPI.start()


         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);
         for (int i = 0; i < nbWriters; i++) {
View Full Code Here


      c1.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      c2.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      c1.getConfiguration().setLockAcquisitionTimeout(5000);
      c2.getConfiguration().setLockAcquisitionTimeout(5000);
      c1.start();
      c2.start();
      final List<Exception> exceptions = new ArrayList<Exception>();

      class MyThread extends Thread
      {
         Object mutex;
View Full Code Here

      Cache c2 = createCache("2", true, false, true, false);

      c2.put(B, "K", "V");

      c1.start();

      assert c1.get(B, "K").equals("V");
      assert c1.get(A, "K") == null;
      assert !l1.exists(A);
   }
View Full Code Here

      ComponentRegistry cr = TestingUtil.extractComponentRegistry(cache);
//      cr.unregisterComponent(CacheMessageListener.class);
      cr.registerComponent(CacheMessageListener.class.getName(), new SecretiveStateCacheMessageListener(), CacheMessageListener.class);
//      cr.updateDependencies();

      cache.start();


      CacheSPI recipient = (CacheSPI) new DefaultCacheFactory().createCache(UnitTestCacheConfigurationFactory.createConfiguration(CacheMode.REPL_ASYNC), false);
      recipient.getConfiguration().setClusterName("VersionedTestBase");
      recipient.getConfiguration().setReplVersionString(getReplicationVersion());
View Full Code Here

      cr.registerComponent(CacheMessageListener.class.getName(), new SecretiveStateCacheMessageListener(), CacheMessageListener.class);
      //cr.updateDependencies();

      try
      {
         recipient.start();
         fail("start() should throw an exception");
      }
      catch (CacheException good)
      {
         // this is what we want
View Full Code Here

      CacheSPI cache2 = null;
      try
      {
         cache2 = createCache("cache2", false, false, true, false, false, true);
         cache2.create();
         cache2.start();

         //Vladimir  October 5th 2007
         //failure of integration of persistent state is not considered to be fatal
         //to revisit with Manik
         //fail("Should have caused an exception");
View Full Code Here

   {
      CacheSPI cache = createCacheUnstarted(false);
      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig());

      cache.create();
      cache.start();
      return cache;
   }

   public void testPassivationLocal() throws Exception
   {
View Full Code Here

      }
      else
      {
         c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.NotifyingTransactionManager");
      }
      c.start();
      return c;
   }

   // we need a 'special' stack that does not attempt redelivery since we kill a channel midway during a tx in this test.
   private String getJGroupsStack()
View Full Code Here

   private CacheSPI createCache()
   {
      CacheSPI c = (CacheSPI) new DefaultCacheFactory().createCache(false);
      c.getConfiguration().setCacheMode("REPL_SYNC");
      c.getConfiguration().setUseRegionBasedMarshalling(true);
      c.start();
      return c;
   }

   @SuppressWarnings("unchecked")
   public void testTransferToInactiveRegion()
View Full Code Here

      c.setStateRetrievalTimeout(5000);
      c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      c.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
      c.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      cache.create();
      cache.start();


      return cache;
   }
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.