Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.FileCacheStoreConfigurationBuilder


      parseLoaderChildren(reader, cclb);
   }

   private void parseFileStore(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException {
      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();
      FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
      for (int i = 0; i < reader.getAttributeCount(); i++) {
         ParseUtils.requireNoNamespaceAttribute(reader, i);
         String value = replaceProperties(reader.getAttributeValue(i));
         Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
         switch (attribute) {
         case LOCATION:
            fcscb.location(value);
            break;
         case FSYNC_INTERVAL:
            fcscb.fsyncInterval(Long.parseLong(value));
            break;
         case FSYNC_MODE:
            fcscb.fsyncMode(FsyncMode.valueOf(value));
            break;
         case STREAM_BUFFER_SIZE:
            fcscb.streamBufferSize(Integer.parseInt(value));
            break;
         default:
            parseLockSupportStoreAttributes(reader, i, fcscb);
            break;
         }
View Full Code Here


         }
      }

      if (loader != null) {
         if (loader instanceof FileCacheStore) {
            FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
            if (fetchPersistentState != null)
               fcscb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               fcscb.ignoreModifications(ignoreModifications);
            if (purgeOnStartup != null)
               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, fcscb);
         } else if (loader instanceof CacheStore){
            log.deprecatedLoaderAsStoreConfiguration();
            LegacyStoreConfigurationBuilder scb = builder.loaders().addStore();
            scb.cacheStore((CacheStore)loader);
View Full Code Here

         }
      }

      if (store != null) {
         if (store instanceof FileCacheStore) {
            FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
            if (fetchPersistentState != null)
               fcscb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               fcscb.ignoreModifications(ignoreModifications);
            if (purgeOnStartup != null)
               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, fcscb);
         } else if (store instanceof CacheStore){
            LegacyStoreConfigurationBuilder scb = builder.loaders().addStore();
            scb.cacheStore((CacheStore) store);
            if (fetchPersistentState != null)
View Full Code Here

         }
      }

      if (loader != null) {
         if (loader instanceof FileCacheStore) {
            FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
            if (fetchPersistentState != null)
               fcscb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               fcscb.ignoreModifications(ignoreModifications);
            if (purgeOnStartup != null)
               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, fcscb);
         } else if (loader instanceof CacheStore){
            LegacyStoreConfigurationBuilder scb = builder.loaders().addStore();
            scb.cacheStore((CacheStore)loader);
            if (fetchPersistentState != null)
View Full Code Here

         }
      }

      if (loader != null) {
         if (loader instanceof FileCacheStore) {
            FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
            if (fetchPersistentState != null)
               fcscb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               fcscb.ignoreModifications(ignoreModifications);
            if (purgeOnStartup != null)
               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, fcscb);
         } else if (loader instanceof CacheStore){
            LegacyStoreConfigurationBuilder scb = builder.loaders().addStore();
            scb.cacheStore((CacheStore)loader);
            if (fetchPersistentState != null)
View Full Code Here

   }

   private Configuration buildCfg(boolean clustered) {
      ConfigurationBuilder cb = new ConfigurationBuilder();

      FileCacheStoreConfigurationBuilder fileStoreCB = cb.loaders().addFileCacheStore().location(fileCacheStoreTmpDir);
      fileStoreCB.purgeOnStartup(false);

      cb.loaders().passivation(false);
      cb.loaders().preload(true);
      cb.loaders().shared(true);
View Full Code Here

   protected EmbeddedCacheManager createCacheManager(String tmpDirectory) {
      configurationBuilder.loaders().clearCacheLoaders();
      configurationBuilder.loaders().shared(sharedCacheLoader.get());

      FileCacheStoreConfigurationBuilder fcsBuilder = configurationBuilder.loaders().addFileCacheStore();
      fcsBuilder
            .purgeSynchronously(true) // for more accurate unit testing
            .fetchPersistentState(true)
            .purgeOnStartup(false)
            .location(tmpDirectory);
View Full Code Here

         }
      }

      if (loader != null) {
         if (loader instanceof FileCacheStore) {
            FileCacheStoreConfigurationBuilder fcscb = builder.loaders().addFileCacheStore();
            if (fetchPersistentState != null)
               fcscb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               fcscb.ignoreModifications(ignoreModifications);
            if (purgeOnStartup != null)
               fcscb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               fcscb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, fcscb);
         } else if (loader instanceof CacheStore){
            LegacyStoreConfigurationBuilder scb = builder.loaders().addStore();
            scb.cacheStore((CacheStore)loader);
            if (fetchPersistentState != null)
View Full Code Here

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

   protected EmbeddedCacheManager createCacheManager(String tmpDirectory) {
      configurationBuilder.loaders().clearCacheLoaders();
      configurationBuilder.loaders().shared(sharedCacheLoader.get());

      FileCacheStoreConfigurationBuilder fcsBuilder = configurationBuilder.loaders().addFileCacheStore();
      fcsBuilder
            .purgeSynchronously(true) // for more accurate unit testing
            .fetchPersistentState(true)
            .purgeOnStartup(false)
            .location(tmpDirectory);
View Full Code Here

TOP

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

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.