Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.LoaderConfigurationBuilder


            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


            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

               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

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

               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);
            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

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.