Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.loaders()


      assert store.sharedTable();
      assert store.fetchPersistentState();
      assert store.async().enabled();

      b = new ConfigurationBuilder();
      b.loaders().addStore(HBaseCacheStoreConfigurationBuilder.class).read(store);
      Configuration configuration2 = b.build();
      HBaseCacheStoreConfiguration store2 = (HBaseCacheStoreConfiguration) configuration2.loaders().cacheLoaders().get(0);
      assert !store2.autoCreateTable();
      assert store2.entryColumnFamily().equals("ECF");
      assert store2.entryTable().equals("ET");
View Full Code Here


      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();

      Element element = Element.forName(reader.getLocalName());
      switch (element) {
      case REMOTE_STORE: {
         parseRemoteStore(reader, builder.loaders(), holder.getClassLoader());
         break;
      }
      default: {
         throw ParseUtils.unexpectedElement(reader);
      }
View Full Code Here

      sourceContainer = TestCacheManagerFactory.createCacheManager(serverBuilder);
      sourceServerCache = sourceContainer.getCache();
      sourceServer = TestHelper.startHotRodServer(sourceContainer);

      ConfigurationBuilder targetConfigurationBuilder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      targetConfigurationBuilder.loaders().addStore(RemoteCacheStoreConfigurationBuilder.class).hotRodWrapping(true).addServer().host("localhost").port(sourceServer.getPort());

      targetContainer = TestCacheManagerFactory.createCacheManager(targetConfigurationBuilder);
      targetServerCache = targetContainer.getCache();
      targetServer = TestHelper.startHotRodServer(targetContainer);
View Full Code Here

      }

      Factory<CacheLoader<K,V>> cacheLoaderFactory = c.getCacheLoaderFactory();
      if (cacheLoaderFactory != null) {
         // User-defined cache loader will be plugged once cache has started
         cb.loaders().addStore().cacheStore(new JCacheLoaderAdapter());
      }

      Factory<CacheWriter<? super K, ? super V>> cacheWriterFactory = c.getCacheWriterFactory();
      if (cacheWriterFactory != null) {
         // User-defined cache writer will be plugged once cache has started
View Full Code Here

      }

      Factory<CacheWriter<? super K, ? super V>> cacheWriterFactory = c.getCacheWriterFactory();
      if (cacheWriterFactory != null) {
         // User-defined cache writer will be plugged once cache has started
         cb.loaders().addStore().cacheStore(new JCacheWriterAdapter());
      }

      if (c.isStatisticsEnabled())
         cb.jmxStatistics().enable();
View Full Code Here

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      // start a single cache instance
      ConfigurationBuilder cb = getDefaultStandaloneCacheConfig(true);
      cb.invocationBatching().enable();
      addCacheStore(cb.loaders().addStore());
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(cb);
      cache = new TreeCacheImpl<String, String>(cm.getCache());
      store = extractCacheStore();
      return cm;
   }
View Full Code Here

      waitForClusterToForm();
   }

   private ConfigurationBuilder buildCacheConfig(String storeName) {
      ConfigurationBuilder cb = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      cb.loaders().addStore().cacheStore(new DummyInMemoryCacheStore(storeName));
      return cb;
   }

   public void testDisjointSetTransaction() throws Exception {
      MagicKey k1 = new MagicKey(cache(0), cache(1));
View Full Code Here

public class ConfigurationCompatibilityTest {

   public void testModeShapeStoreConfiguration() {
      // This code courtesy of Randall Hauch
      ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
      LoaderConfigurationBuilder lb = configurationBuilder.loaders().addCacheLoader().cacheLoader(new FileCacheStore());
      lb.addProperty("dropTableOnExit", "false").addProperty("createTableOnStart", "true")
            .addProperty("connectionFactoryClass", "org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory")
            .addProperty("connectionUrl", "jdbc:h2:file:/abs/path/string_based_db;DB_CLOSE_DELAY=1").addProperty("driverClass", "org.h2.Driver").addProperty("userName", "sa")
            .addProperty("idColumnName", "ID_COLUMN").addProperty("idColumnType", "VARCHAR(255)").addProperty("timestampColumnName", "TIMESTAMP_COLUMN")
            .addProperty("timestampColumnType", "BIGINT").addProperty("dataColumnName", "DATA_COLUMN").addProperty("dataColumnType", "BINARY")
View Full Code Here

            .addProperty("bucketTableNamePrefix", "MODE").addProperty("cacheName", "default");
   }

   public void testAS71StoreConfiguration() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.loaders().shared(false).preload(true).passivation(false);
      LoaderConfigurationBuilder storeBuilder = builder.loaders().addCacheLoader().fetchPersistentState(false).purgeOnStartup(false).purgeSynchronously(true);
      storeBuilder.singletonStore().enabled(false);
   }

   public void testAS72StoreConfiguration() {
View Full Code Here

   }

   public void testAS71StoreConfiguration() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.loaders().shared(false).preload(true).passivation(false);
      LoaderConfigurationBuilder storeBuilder = builder.loaders().addCacheLoader().fetchPersistentState(false).purgeOnStartup(false).purgeSynchronously(true);
      storeBuilder.singletonStore().enabled(false);
   }

   public void testAS72StoreConfiguration() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
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.