Examples of addIndividualCacheLoaderConfig()


Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      i = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i.setFetchPersistentState(true);
      i2 = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i2.setFetchPersistentState(false);

      cfg.addIndividualCacheLoaderConfig(i);
      cfg.addIndividualCacheLoaderConfig(i2);

      assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
      mgr.setConfig(cfg, null, null);
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      i.setFetchPersistentState(true);
      i2 = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i2.setFetchPersistentState(false);

      cfg.addIndividualCacheLoaderConfig(i);
      cfg.addIndividualCacheLoaderConfig(i2);

      assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
      mgr.setConfig(cfg, null, null);

      // control cases which should not throw exceptions
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      i = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i.setFetchPersistentState(false);
      i2 = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i2.setFetchPersistentState(false);

      cfg.addIndividualCacheLoaderConfig(i);
      cfg.addIndividualCacheLoaderConfig(i2);

      assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
      mgr.setConfig(cfg, null, null);
   }
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      i.setFetchPersistentState(false);
      i2 = createIndividualCacheLoaderConfig(cfg, true, "org.jboss.cache.loader.FileCacheLoader");
      i2.setFetchPersistentState(false);

      cfg.addIndividualCacheLoaderConfig(i);
      cfg.addIndividualCacheLoaderConfig(i2);

      assertEquals(2, cfg.getIndividualCacheLoaderConfigs().size());
      mgr.setConfig(cfg, null, null);
   }
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());

      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(true);

      c.setCacheLoaderConfig(clc);
      cache = new UnitTestCacheFactory<Object, Object>().createCache(c, getClass());
      eventLog.events.clear();
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

   public void setUp() throws Exception
   {
      cache = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(false, getClass());
      CacheLoaderConfig clc = new CacheLoaderConfig();
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      clc.addIndividualCacheLoaderConfig(iclc);
      cache.getConfiguration().setCacheLoaderConfig(clc);
      cache.getConfiguration().setNodeLockingScheme(NodeLockingScheme.PESSIMISTIC);
      mockCacheLoader = createMock(CacheLoader.class);

      expect(mockCacheLoader.getConfig()).andReturn(null).anyTimes();
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

   protected CacheLoaderConfig getCacheLoaderConfig(boolean ignoreMods1, boolean ignoreMods2) throws Exception
   {
      CacheLoaderConfig clc = UnitTestConfigurationFactory.buildSingleCacheLoaderConfig(false, null, DummyInMemoryCacheLoader.class.getName(), "", false, true, false, false, ignoreMods1);
      CacheLoaderConfig.IndividualCacheLoaderConfig ic = UnitTestConfigurationFactory.buildIndividualCacheLoaderConfig(null, DummyInMemoryCacheLoader.class.getName(), "", false, false, false, ignoreMods2);
      clc.addIndividualCacheLoaderConfig(ic);
      return clc;
   }

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

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      LocalDelegatingCacheLoaderConfig cfg = new LocalDelegatingCacheLoaderConfig();
      cfg.setDelegate(delegating_cache);
      cfg.setAsync(false);
      cfg.setFetchPersistentState(false);
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.addIndividualCacheLoaderConfig(cfg);
      cacheLoaderConfig.setPassivation(true);
      cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
   }

   @AfterMethod(alwaysRun = true)
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      LocalDelegatingCacheLoaderConfig cfg = new LocalDelegatingCacheLoaderConfig();
      cfg.setDelegate(delegatingCache);
      cfg.setAsync(false);
      cfg.setFetchPersistentState(false);
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.addIndividualCacheLoaderConfig(cfg);
      cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
   }

   @Test(groups = {"functional"}, enabled = false)
   public void testLoadAndStore() throws Exception
View Full Code Here

Examples of org.jboss.cache.config.CacheLoaderConfig.addIndividualCacheLoaderConfig()

      //setCacheLoader(new TestSlowCacheLoader());
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      //iclc.setClassName(TestSlowCacheLoader.class.getName());
      iclc.setCacheLoader(new TestSlowCacheLoader());
      clc.addIndividualCacheLoaderConfig(iclc);
      cache.getConfiguration().setCacheLoaderConfig(clc);
      cache.getConfiguration().setNodeLockingScheme(NodeLockingScheme.PESSIMISTIC);
      cache.start();

      long begin = System.currentTimeMillis();
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.