Package org.infinispan.configuration.cache

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


         switch (attribute) {
            case PASSIVATION:
               builder.loaders().passivation(Boolean.parseBoolean(value));
               break;
            case PRELOAD:
               builder.loaders().preload(Boolean.parseBoolean(value));
               break;
            case SHARED:
               builder.loaders().shared(Boolean.parseBoolean(value));
               break;
            default:
View Full Code Here


               break;
            case PRELOAD:
               builder.loaders().preload(Boolean.parseBoolean(value));
               break;
            case SHARED:
               builder.loaders().shared(Boolean.parseBoolean(value));
               break;
            default:
               throw ParseUtils.unexpectedAttribute(reader, i);
         }
      }
View Full Code Here

      }
   }

   private void parseClusterLoader(XMLExtendedStreamReader reader, ConfigurationBuilderHolder holder) throws XMLStreamException {
      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();
      ClusterCacheLoaderConfigurationBuilder cclb = builder.loaders().addClusterCacheLoader();
      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) {
View Full Code Here

      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) {
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)
View Full Code Here

            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);
            if (fetchPersistentState != null)
               scb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               scb.ignoreModifications(ignoreModifications);
View Full Code Here

               scb.purgeOnStartup(purgeOnStartup);
            if (purgeSynchronously != null)
               scb.purgeSynchronously(purgeSynchronously);
            parseStoreChildren(reader, scb);
         } else if (loader instanceof ClusterCacheLoader) {
            ClusterCacheLoaderConfigurationBuilder cclb = builder.loaders().addClusterCacheLoader();
            parseLoaderChildren(reader, cclb);
         } else if (loader instanceof CacheLoader) {
            LegacyLoaderConfigurationBuilder lcb = builder.loaders().addLoader();
            lcb.cacheLoader((CacheLoader)loader);
            parseLoaderChildren(reader, lcb);
View Full Code Here

            parseStoreChildren(reader, scb);
         } else if (loader instanceof ClusterCacheLoader) {
            ClusterCacheLoaderConfigurationBuilder cclb = builder.loaders().addClusterCacheLoader();
            parseLoaderChildren(reader, cclb);
         } else if (loader instanceof CacheLoader) {
            LegacyLoaderConfigurationBuilder lcb = builder.loaders().addLoader();
            lcb.cacheLoader((CacheLoader)loader);
            parseLoaderChildren(reader, lcb);
         } else {
            throw log.invalidCacheLoaderClass(loader.getClass().getName());
         }
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)
View Full Code Here

               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)
               scb.fetchPersistentState(fetchPersistentState);
            if (ignoreModifications != null)
               scb.ignoreModifications(ignoreModifications);
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.