Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.LoaderConfigurationBuilder


               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, fcscb);
         } else {
            LoaderConfigurationBuilder lcb = builder.loaders().addCacheLoader();
            lcb.cacheLoader(loader);
            if (fetchPersistentState != null)
               lcb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               lcb.ignoreModifications(ignoreModifications);
            if (purgerThreads != null)
               lcb.purgerThreads(purgerThreads);
            if (purgeOnStartup != null)
               lcb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               lcb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, lcb);
         }
        
      }
     
View Full Code Here


      ConfigurationBuilder cb = new ConfigurationBuilder();
      cb.clustering().invocationBatching().enable().versioning().enable()
               .scheme(VersioningScheme.SIMPLE).transaction().lockingMode(LockingMode.PESSIMISTIC);
      cb.loaders().passivation(false).preload(true).shared(true);
      // Make it really shared by adding the test's name as store name
      LoaderConfigurationBuilder lb = cb.loaders().addCacheLoader()
               .cacheLoader(new DummyInMemoryCacheStore());
      lb.addProperty("storeName", getClass().getSimpleName());

      EmbeddedCacheManager cm1 = TestCacheManagerFactory.createClusteredCacheManager();
      EmbeddedCacheManager cm2 = TestCacheManagerFactory.createClusteredCacheManager();
      registerCacheManager(cm1, cm2);
     
View Full Code Here

               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, fcscb);
         } else {
            LoaderConfigurationBuilder lcb = builder.loaders().addCacheLoader();
            lcb.cacheLoader(loader);
            if (fetchPersistentState != null)
               lcb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               lcb.ignoreModifications(ignoreModifications);
            if (purgerThreads != null)
               lcb.purgerThreads(purgerThreads);
            if (purgeOnStartup != null)
               lcb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               lcb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, lcb);
         }
        
      }
     
View Full Code Here

               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, fcscb);
         } else {
            LoaderConfigurationBuilder lcb = builder.loaders().addCacheLoader();
            lcb.cacheLoader(loader);
            if (fetchPersistentState != null)
               lcb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               lcb.ignoreModifications(ignoreModifications);
            if (purgerThreads != null)
               lcb.purgerThreads(purgerThreads);
            if (purgeOnStartup != null)
               lcb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               lcb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, lcb);
         }
        
      }
     
View Full Code Here

               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, fcscb);
         } else {
            LoaderConfigurationBuilder lcb = builder.loaders().addCacheLoader();
            lcb.cacheLoader(loader);
            if (fetchPersistentState != null)
               lcb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               lcb.ignoreModifications(ignoreModifications);
            if (purgerThreads != null)
               lcb.purgerThreads(purgerThreads);
            if (purgeOnStartup != null)
               lcb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               lcb.purgeSynchronously(purgeSynchronously);
            parseLoaderChildren(reader, lcb);
         }
        
      }
     
View Full Code Here

               fcscb.purgeOnStartup(purgeOnStartup.booleanValue());
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously.booleanValue());
            parseLoaderChildren(reader, fcscb);
         } else {
            LoaderConfigurationBuilder lcb = builder.loaders().addCacheLoader();
            lcb.cacheLoader(loader);
            if (fetchPersistentState != null)
               lcb.fetchPersistentState(fetchPersistentState.booleanValue());
            if (ignoreModifications != null)
               lcb.ignoreModifications(ignoreModifications.booleanValue());
            if (purgerThreads != null)
               lcb.purgerThreads(purgerThreads.intValue());
            if (purgeOnStartup != null)
               lcb.purgeOnStartup(purgeOnStartup.booleanValue());
            if (purgeSynchronously != null)
               lcb.purgeSynchronously(purgeSynchronously.booleanValue());
            parseLoaderChildren(reader, lcb);
         }
        
      }
     
View Full Code Here

            builder.loaders()
                    .shared(store.hasDefined(ModelKeys.SHARED) ? store.get(ModelKeys.SHARED).asBoolean() : false)
                    .preload(store.hasDefined(ModelKeys.PRELOAD) ? store.get(ModelKeys.PRELOAD).asBoolean() : false)
                    .passivation(store.hasDefined(ModelKeys.PASSIVATION) ? store.get(ModelKeys.PASSIVATION).asBoolean() : true)
            ;
            LoaderConfigurationBuilder storeBuilder = builder.loaders().addCacheLoader()
                    .fetchPersistentState(store.hasDefined(ModelKeys.FETCH_STATE) ? store.get(ModelKeys.FETCH_STATE).asBoolean() : true)
                    .purgeOnStartup(store.hasDefined(ModelKeys.PURGE) ? store.get(ModelKeys.PURGE).asBoolean() : true)
                    .purgeSynchronously(true)
            ;
            storeBuilder.singletonStore().enabled(store.hasDefined(ModelKeys.SINGLETON) ? store.get(ModelKeys.SINGLETON).asBoolean() : false);
            this.buildCacheStore(storeBuilder, containerName, store, storeKey, dependencies);
        }
    }
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")
            .addProperty("bucketTableNamePrefix", "MODE").addProperty("cacheName", "default");
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);
   }
View Full Code Here

            builder.loaders()
                    .shared(shared)
                    .preload(preload)
                    .passivation(passivation)
            ;
            LoaderConfigurationBuilder storeBuilder = builder.loaders().addCacheLoader()
                    .fetchPersistentState(fetchState)
                    .purgeOnStartup(purge)
                    .purgeSynchronously(true);
            storeBuilder.singletonStore().enabled(singleton);

            if (async) {
                ModelNode writeBehind = store.get(ModelKeys.WRITE_BEHIND, ModelKeys.WRITE_BEHIND_NAME);
                storeBuilder.async().enable()
                        .flushLockTimeout(CommonAttributes.FLUSH_LOCK_TIMEOUT.resolveModelAttribute(context, writeBehind).asLong())
                        .modificationQueueSize(CommonAttributes.MODIFICATION_QUEUE_SIZE.resolveModelAttribute(context, writeBehind).asInt())
                        .shutdownTimeout(CommonAttributes.SHUTDOWN_TIMEOUT.resolveModelAttribute(context, writeBehind).asLong())
                        .threadPoolSize(CommonAttributes.THREAD_POOL_SIZE.resolveModelAttribute(context, writeBehind).asInt());
            }
View Full Code Here

TOP

Related Classes of org.infinispan.configuration.cache.LoaderConfigurationBuilder

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.