Package org.infinispan.config

Examples of org.infinispan.config.CacheLoaderManagerConfig.addCacheLoaderConfig()


      TableManipulation tm = UnitTestDatabaseManager.buildStringTableManipulation();
      JdbcStringBasedCacheStoreConfig jdbcStoreConfiguration = new JdbcStringBasedCacheStoreConfig(connectionFactoryConfig, tm);
      jdbcStoreConfiguration.setKey2StringMapperClass(LuceneKey2StringMapper.class.getName());
      CacheLoaderManagerConfig loaderManagerConfig = configuration.getCacheLoaderManagerConfig();
      loaderManagerConfig.setPreload(Boolean.FALSE);
      loaderManagerConfig.addCacheLoaderConfig(jdbcStoreConfiguration);
   }

   @Test
   public void testIndexUsage() throws IOException {
      cache = cacheManager.getCache();
View Full Code Here


      DummyInMemoryCacheStore.Cfg cfg = new DummyInMemoryCacheStore.Cfg();

      CacheLoaderManagerConfig clManagerConfig = new CacheLoaderManagerConfig();
      clManagerConfig.setPassivation(false);
      clManagerConfig.addCacheLoaderConfig(cfg);
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.LOCAL);
      configuration.setExposeJmxStatistics(true);
      configuration.setCacheLoaderManagerConfig(clManagerConfig);

      cacheManager.defineConfiguration("test", configuration);
View Full Code Here

      Configuration c = getDefaultStandaloneConfig(true);
      c.setInvocationBatchingEnabled(true);
      c.setUseLazyDeserialization(true);
      CacheLoaderManagerConfig clmc = new CacheLoaderManagerConfig();
      clmc.setPassivation(true);
      clmc.addCacheLoaderConfig(new DummyInMemoryCacheStore.Cfg());
      c.setCacheLoaderManagerConfig(clmc);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(c);
      cache = cm.getCache();
      store = TestingUtil.extractComponent(cache, CacheLoaderManager.class).getCacheStore();
      return cm;
View Full Code Here

   public void setUp() {
      cm = TestCacheManagerFactory.createLocalCacheManager(false);
      Configuration c = new Configuration();
      CacheLoaderManagerConfig clmc = new CacheLoaderManagerConfig();
      DummyInMemoryCacheStore.Cfg clc = new DummyInMemoryCacheStore.Cfg("no_passivation");
      clmc.addCacheLoaderConfig(clc);
      c.setCacheLoaderManagerConfig(clmc);
      cm.defineConfiguration("no_passivation", c);

      c = c.clone();
      ((DummyInMemoryCacheStore.Cfg) c.getCacheLoaderManagerConfig().getFirstCacheLoaderConfig()).setStoreName("passivation");
View Full Code Here

   @BeforeTest
   public void setUp() {
      cfg = TestCacheManagerFactory.getDefaultConfiguration(true);
      CacheLoaderManagerConfig clmc = new CacheLoaderManagerConfig();
      clmc.setPassivation(true);
      clmc.addCacheLoaderConfig(new DummyInMemoryCacheStore.Cfg());
      cfg.setCacheLoaderManagerConfig(clmc);
      cm = TestCacheManagerFactory.createCacheManager(cfg);
      cache = cm.getCache();
      store = TestingUtil.extractComponent(cache, CacheLoaderManager.class).getCacheStore();
      tm = TestingUtil.getTransactionManager(cache);
View Full Code Here

      Configuration conf = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC);
      DummyInMemoryCacheStore.Cfg cfg = new DummyInMemoryCacheStore.Cfg();
      cfg.setStoreName("Store-" + storeCounter.getAndIncrement());
      CacheLoaderManagerConfig pushingCfg = new CacheLoaderManagerConfig();
      pushingCfg.addCacheLoaderConfig(cfg);
      SingletonStoreConfig ssc = new SingletonStoreConfig();
      ssc.setPushStateWhenCoordinator(true);
      ssc.setSingletonStoreEnabled(true);
      cfg.setSingletonStoreConfig(ssc);
      conf.setCacheLoaderManagerConfig(pushingCfg);
View Full Code Here

      conf = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC);
      cfg = new DummyInMemoryCacheStore.Cfg();
      cfg.setStoreName("Store-" + storeCounter.getAndIncrement());
      CacheLoaderManagerConfig nonPushingCfg = new CacheLoaderManagerConfig();
      nonPushingCfg.addCacheLoaderConfig(cfg);
      ssc = new SingletonStoreConfig();
      ssc.setPushStateWhenCoordinator(false);
      ssc.setSingletonStoreEnabled(true);
      cfg.setSingletonStoreConfig(ssc);
      conf.setCacheLoaderManagerConfig(nonPushingCfg);
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration c = new Configuration();
      c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      CacheLoaderManagerConfig clmc = new CacheLoaderManagerConfig();
      clmc.addCacheLoaderConfig(new DummyInMemoryCacheStore.Cfg("ReplicatedSharedEvictingLoaderTest"));
      clmc.setShared(true);
      clmc.setPassivation(true);
      c.setCacheLoaderManagerConfig(clmc);
      createCluster(c, 2);
      waitForClusterToForm();
View Full Code Here

   }

   public void testPreloadAndExpiry() {
      CacheLoaderManagerConfig cacheLoaders = new CacheLoaderManagerConfig();
      cacheLoaders.setPreload(true);
      cacheLoaders.addCacheLoaderConfig(csConfig);
      Configuration cfg = TestCacheManagerFactory.getDefaultConfiguration(false);
      cfg.setCacheLoaderManagerConfig(cacheLoaders);
      CacheContainer local = TestCacheManagerFactory.createCacheManager(cfg);
      try {
         Cache<String, String> cache = local.getCache();
View Full Code Here

   }

   public void testPreloadStoredAsBinary() {
      CacheLoaderManagerConfig cacheLoaders = new CacheLoaderManagerConfig();
      cacheLoaders.setPreload(true);
      cacheLoaders.addCacheLoaderConfig(csConfig);
      Configuration cfg = TestCacheManagerFactory.getDefaultConfiguration(false);
      cfg.setUseLazyDeserialization(true);
      cfg.setCacheLoaderManagerConfig(cacheLoaders);
      CacheContainer local = TestCacheManagerFactory.createCacheManager(cfg);
      try {
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.