Package org.jboss.cache.config.CacheLoaderConfig

Examples of org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig


         UnitTestCacheFactory<String, String> cf = new UnitTestCacheFactory<String, String>();
         Configuration cfg = UnitTestConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC);
         cfg.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
         cfg.setFetchInMemoryState(true);
         // 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);
View Full Code Here


      {
         Configuration cfg = UnitTestConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC);
         cfg.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
         cfg.setFetchInMemoryState(true);
         // 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);
View Full Code Here

   }

   protected CacheLoaderConfig getCacheLoaderConfig(boolean pasv, boolean fetchPersistentState) throws Exception
   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(DummyInMemoryCacheLoader.class.getName());
      iclc.setFetchPersistentState(fetchPersistentState);
      clc.addIndividualCacheLoaderConfig(iclc);
      clc.setPassivation(pasv);
      return clc;
   }
View Full Code Here

   }

   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;
   }
View Full Code Here

   protected CacheSPI createCacheWithCacheLoader(boolean useDataGravitation, boolean removeOnFind, boolean passivation, boolean fetchPersistent, boolean start) throws Exception
   {
      CacheSPI cache = createCache(1, null, useDataGravitation, removeOnFind, false);

      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

   public static CacheLoaderConfig buildSingleCacheLoaderConfig(boolean passivation, String preload, String cacheloaderClass,
                                                                String properties, boolean async, boolean fetchPersistentState,
                                                                boolean shared, boolean purgeOnStartup, boolean ignoreModifications) throws Exception
   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(cacheloaderClass);
      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

   public static CacheLoaderConfig buildSingleCacheLoaderConfig(boolean passivation, String preload, String cacheloaderClass,
                                                                Properties properties, boolean async, boolean fetchPersistentState,
                                                                boolean shared, boolean purgeOnStartup, boolean ignoreModifications) throws Exception
   {
      CacheLoaderConfig clc = new CacheLoaderConfig();
      IndividualCacheLoaderConfig iclc = new IndividualCacheLoaderConfig();
      iclc.setClassName(cacheloaderClass);
      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

      singletonStoreProperties.setProperty("pushStateWhenCoordinator", pushState.toString());
      singletonStoreProperties.setProperty("pushStateWhenCoordinatorTimeout", pushStateTimeOut.toString());
      singletonStoreConfig.setProperties(singletonStoreProperties);
      singletonStoreConfig.setSingletonStoreEnabled(true);
      // create CacheLoaderConfig
      IndividualCacheLoaderConfig individualCacheLoaderConfig = new IndividualCacheLoaderConfig();
      // set SingletonStoreConfig
      individualCacheLoaderConfig.setSingletonStoreConfig(singletonStoreConfig);
      // set CacheLoader
      individualCacheLoaderConfig.setCacheLoader(indexerCacheLoader);
      // set parameters
      individualCacheLoaderConfig.setFetchPersistentState(false);
      individualCacheLoaderConfig.setAsync(false);
      individualCacheLoaderConfig.setIgnoreModifications(false);
      individualCacheLoaderConfig.setPurgeOnStartup(false);
      // create CacheLoaderConfig
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.setShared(false);
      cacheLoaderConfig.setPassivation(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
View Full Code Here

      }

      ControllerCacheLoader ccl = new ControllerCacheLoader(currentCL);
      List<IndividualCacheLoaderConfig> newConfig = new ArrayList<IndividualCacheLoaderConfig>(1);
      // create CacheLoaderConfig
      IndividualCacheLoaderConfig cclConfig = new IndividualCacheLoaderConfig();
      // set CacheLoader
      cclConfig.setCacheLoader(ccl);
      // set parameters
      cclConfig.setFetchPersistentState(clm.isFetchPersistentState());
      cclConfig.setAsync(false);
      cclConfig.setIgnoreModifications(false);
      CacheLoaderConfig.IndividualCacheLoaderConfig first = config.getFirstCacheLoaderConfig();
      cclConfig.setPurgeOnStartup(first != null && first.isPurgeOnStartup());
      newConfig.add(cclConfig);
      config.setIndividualCacheLoaderConfigs(newConfig);

      if (LOG.isInfoEnabled())
      {
View Full Code Here

      // initialize IndexerCacheLoader
      IndexerCacheLoader indexerCacheLoader = new LocalIndexCacheLoader();

      // create CacheLoaderConfig
      IndividualCacheLoaderConfig individualCacheLoaderConfig = new IndividualCacheLoaderConfig();
      // set CacheLoader
      individualCacheLoaderConfig.setCacheLoader(indexerCacheLoader);
      // set parameters
      individualCacheLoaderConfig.setFetchPersistentState(false);
      individualCacheLoaderConfig.setAsync(false);
      individualCacheLoaderConfig.setIgnoreModifications(false);
      individualCacheLoaderConfig.setPurgeOnStartup(false);
      // create CacheLoaderConfig
      CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
      cacheLoaderConfig.setShared(false);
      cacheLoaderConfig.setPassivation(false);
      cacheLoaderConfig.addIndividualCacheLoaderConfig(individualCacheLoaderConfig);
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig

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.