Package org.jboss.cache.config

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


   private CacheLoaderConfig buildCacheLoaderConfig() throws Exception
   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(DummySharedInMemoryCacheLoader.class.getName());
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(true);
      return clc;
   }

   private EvictionConfig buildEvictionConfig() throws Exception
View Full Code Here


      CacheLoaderConfig.IndividualCacheLoaderConfig dummyConfig = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      dummyConfig.setAsync(false);
      dummyConfig.setFetchPersistentState(true);
      dummyConfig.setIgnoreModifications(false);
      dummyConfig.setClassName(DummyInMemoryCacheLoader.class.getName());
      clc.addIndividualCacheLoaderConfig(dummyConfig);
      cache.getConfiguration().setCacheLoaderConfig(clc);
   }

   protected void configureEviction() throws Exception
   {
View Full Code Here

      CacheLoaderConfig config = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      iclc.setFetchPersistentState(fetchPersistent);
      config.addIndividualCacheLoaderConfig(iclc);
      config.setShared(false);
      config.setPassivation(passivation);
      cache.getConfiguration().setCacheLoaderConfig(config);
      if (start)
      {
View Full Code Here

      iclc.setClassName(DummySharedInMemoryCacheLoader.class.getName());
      Properties props = new Properties();
      props.setProperty("bin", "bin-" + Thread.currentThread().getName());
      iclc.setProperties(props);
      CacheLoaderConfig clc = new CacheLoaderConfig();     
      clc.addIndividualCacheLoaderConfig(iclc);     
      cache.getConfiguration().setCacheLoaderConfig(clc);
      // disable state transfer!!
      cache.getConfiguration().setFetchInMemoryState(false);

      cache.start();
View Full Code Here

      assert c.getCacheLoaderManager().getCacheLoader() == null;

      CacheLoaderConfig clc = new CacheLoaderConfig();
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      iclc.setCacheLoader(new DummyInMemoryCacheLoader());
      clc.addIndividualCacheLoaderConfig(iclc);
      c.getConfiguration().setCacheLoaderConfig(clc);

      c.start();
      assert c.getCacheLoaderManager() != null;
      assert c.getCacheLoaderManager().getCacheLoader() instanceof DummyInMemoryCacheLoader;
View Full Code Here

      iclc.setAsync(async);
      iclc.setFetchPersistentState(fetchPersistentState);
      iclc.setPurgeOnStartup(purgeOnStartup);
      iclc.setIgnoreModifications(ignoreModifications);
      iclc.setProperties(properties);
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(passivation);
      clc.setShared(shared);
      clc.setPreload(preload);
      return clc;
   }
View Full Code Here

      iclc.setAsync(async);
      iclc.setFetchPersistentState(fetchPersistentState);
      iclc.setPurgeOnStartup(purgeOnStartup);
      iclc.setIgnoreModifications(ignoreModifications);
      iclc.setProperties(properties);
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(passivation);
      clc.setShared(shared);
      clc.setPreload(preload);
      return clc;
   }
View Full Code Here

   private CacheLoaderConfig buildCacheLoaderConfig() throws IOException
   {
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      cacheLoaderConfig.addIndividualCacheLoaderConfig(iclc);
      return cacheLoaderConfig;
   }

   @AfterMethod(alwaysRun = true)
   public void tearDown() throws Exception
View Full Code Here

      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      iclc.setClassName("org.jboss.cache.loader.testloaders.DummyInMemoryCacheLoader");
      iclc.setAsync(false);
      iclc.setFetchPersistentState(true);
      iclc.setIgnoreModifications(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(iclc);
      return cacheLoaderConfig;
   }

   private EvictionConfig buildEvictionConfig()
   {
View Full Code Here

      individualCacheLoaderConfig.setPurgeOnStartup(false);
      // create CacheLoaderConfig
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.setShared(false);
      cacheLoaderConfig.setPassivation(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
      // insert CacheLoaderConfig
      initCache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
      this.rootFqn = Fqn.fromElements(searchManager.getWsId());
      this.cache =
         ExoJBossCacheFactory.getUniqueInstance(CacheType.INDEX_CACHE, rootFqn, initCache,
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.