Package org.jboss.cache.config

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


      individualCacheLoaderConfig.setPurgeOnStartup(false);
      // create CacheLoaderConfig
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.setShared(false);
      cacheLoaderConfig.setPassivation(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
      // insert CacheLoaderConfig
      this.cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
      this.cache.create();
      this.cache.start();
      // start will invoke cache listener which will notify handler that mode is changed
View Full Code Here


      individualCacheLoaderConfig.setPurgeOnStartup(false);
      // create CacheLoaderConfig
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.setShared(false);
      cacheLoaderConfig.setPassivation(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
      // insert CacheLoaderConfig
      this.cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);

      PrivilegedCacheHelper.create(cache);
      PrivilegedCacheHelper.start(cache);
View Full Code Here

   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      cache.getConfiguration().setCacheLoaderConfig(clc);
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      clc.setPassivation(true);
      clc.addIndividualCacheLoaderConfig(iclc);
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      iclc.setProperties("debug=true");
   }
}
View Full Code Here

   private void setUp(NodeLockingScheme locking) 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(locking);
      mockCacheLoader = createMockCacheLoader();

      iclc.setCacheLoader(mockCacheLoader);
View Full Code Here

         // configure with CL
         IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
         iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
         iclc.setFetchPersistentState(false);
         CacheLoaderConfig clc = new CacheLoaderConfig();
         clc.addIndividualCacheLoaderConfig(iclc);

         cfg.setCacheLoaderConfig(clc);
         cfg.setNodeLockingScheme(nls);

         c1 = cf.createCache(cfg.clone(), getClass());
View Full Code Here

      cache2 = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC), false, getClass());

      CacheLoaderConfig clc = new CacheLoaderConfig();
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      clc.addIndividualCacheLoaderConfig(iclc);
      cache1.getConfiguration().setCacheLoaderConfig(clc);
      cache2.getConfiguration().setCacheLoaderConfig(clc.clone());
      cache1.getConfiguration().setUseLazyDeserialization(true);
      cache2.getConfiguration().setUseLazyDeserialization(true);
View Full Code Here

         // configure with CL
         IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
         iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
         iclc.setFetchPersistentState(false);
         CacheLoaderConfig clc = new CacheLoaderConfig();
         clc.addIndividualCacheLoaderConfig(iclc);
         clc.setShared(true); // even though it isn't really a shared CL

         cfg.setCacheLoaderConfig(clc);
         cfg.setNodeLockingScheme(nls);
View Full Code Here

   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      iclc.setFetchPersistentState(fetchPersistentState);
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(pasv);
      return clc;
   }

   public void testSharedCacheLoaderConfig() throws Exception
View Full Code Here

      CacheLoaderConfig clc = new CacheLoaderConfig();
      CacheLoaderConfig.IndividualCacheLoaderConfig iclc = new CacheLoaderConfig.IndividualCacheLoaderConfig();
      iclc.setProperties("debug=true \n bin=" + getClass());
      iclc.setClassName(DummySharedInMemoryCacheLoader.class.getName());
      clc.addIndividualCacheLoaderConfig(iclc);

      cache.getConfiguration().setCacheLoaderConfig(clc);

      cache.start();
View Full Code Here

      CacheLoaderConfig clmc = new CacheLoaderConfig();
      DummySharedInMemoryCacheLoaderConfig clc = new DummySharedInMemoryCacheLoaderConfig("store number " + id++);
      clc.setFetchPersistentState(true);
      clc.setProperties("debug=true");
      clmc.setShared(sharedCacheLoader.get());
      clmc.addIndividualCacheLoaderConfig(clc);
      c.getConfiguration().setCacheLoaderConfig(clmc);

      if (start) c.start();
      return c;
   }
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.