Package org.infinispan.loaders

Examples of org.infinispan.loaders.AbstractCacheStoreConfig


      } else if (loader instanceof LegacyLoaderConfiguration) {
         CacheLoader cacheLoader = ((LegacyLoaderConfiguration) loader).cacheLoader();
         clc = getLoaderConfig(loader, cacheLoader);
      }
      if (clc instanceof AbstractCacheStoreConfig) {
         AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
         Properties p = loader.properties();
         acsc.setProperties(p);
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
         if (loader instanceof LegacyStoreConfiguration)
            acsc.purgerThreads(((LegacyStoreConfiguration)loader).purgerThreads());
      } else if (clc instanceof CacheLoaderConfig) {
         Properties p = loader.properties();
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
      }
      return clc;
View Full Code Here


   private static CacheLoaderConfig getLoaderConfig(LoaderConfiguration loader, CacheLoader cacheLoader) {
      if (cacheLoader.getClass().isAnnotationPresent(CacheLoaderMetadata.class)) {
         return Util.getInstance(cacheLoader.getClass().getAnnotation(CacheLoaderMetadata.class).configurationClass());
      } else {
         AbstractCacheStoreConfig acsc = new AbstractCacheStoreConfig();
         if (loader instanceof LegacyStoreConfiguration) {
            acsc.setCacheLoaderClassName(((LegacyStoreConfiguration) loader).cacheStore().getClass().getName());
         } else {
            acsc.setCacheLoaderClassName(((LegacyLoaderConfiguration) loader).cacheLoader().getClass().getName());
         }
         return acsc;
      }
   }
View Full Code Here

         .passivation(config.loaders().passivation())
         .preload(config.loaders().preload())
         .shared(config.loaders().shared());

      for (LoaderConfiguration loader : config.loaders().cacheLoaders()) {
         AbstractCacheStoreConfig csc = new AbstractCacheStoreConfig();
         csc.setCacheLoaderClassName(loader.cacheLoader().getClass().getName());
         csc.fetchPersistentState(loader.fetchPersistentState());
         csc.ignoreModifications(loader.ignoreModifications());
         csc.purgeOnStartup(loader.purgeOnStartup());
         csc.purgerThreads(loader.purgerThreads());
         csc.setPurgeSynchronously(loader.purgeSynchronously());
         csc.getAsyncStoreConfig().setEnabled(loader.async().enabled());
         csc.getAsyncStoreConfig().flushLockTimeout(loader.async().flushLockTimeout());
         csc.getAsyncStoreConfig().modificationQueueSize(loader.async().modificationQueueSize());
         csc.getAsyncStoreConfig().shutdownTimeout(loader.async().shutdownTimeout());
         csc.getAsyncStoreConfig().threadPoolSize(loader.async().threadPoolSize());
         csc.setProperties(loader.properties());
         csc.getSingletonStoreConfig().enabled(loader.singletonStore().enabled());
         csc.getSingletonStoreConfig().pushStateTimeout(loader.singletonStore().pushStateTimeout());
         csc.getSingletonStoreConfig().pushStateWhenCoordinator(loader.singletonStore().pushStateWhenCoordinator());
         legacy.loaders().addCacheLoader(csc);
      }
     
      legacy.locking()
         .concurrencyLevel(config.locking().concurrencyLevel())
View Full Code Here

      } else if (loader instanceof LegacyLoaderConfiguration) {
         CacheLoader cacheLoader = ((LegacyLoaderConfiguration) loader).cacheLoader();
         clc = getLoaderConfig(loader, cacheLoader);
      }
      if (clc instanceof AbstractCacheStoreConfig) {
         AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
         Properties p = loader.properties();
         acsc.setProperties(p);
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
         if (loader instanceof LegacyStoreConfiguration)
            acsc.purgerThreads(((LegacyStoreConfiguration)loader).purgerThreads());
      } else if (clc instanceof CacheLoaderConfig) {
         Properties p = loader.properties();
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
      }
      return clc;
View Full Code Here

   private static CacheLoaderConfig getLoaderConfig(LoaderConfiguration loader, CacheLoader cacheLoader) {
      if (cacheLoader.getClass().isAnnotationPresent(CacheLoaderMetadata.class)) {
         return Util.getInstance(cacheLoader.getClass().getAnnotation(CacheLoaderMetadata.class).configurationClass());
      } else {
         AbstractCacheStoreConfig acsc = new AbstractCacheStoreConfig();
         if (loader instanceof LegacyStoreConfiguration) {
            acsc.setCacheLoaderClassName(((LegacyStoreConfiguration) loader).cacheStore().getClass().getName());
         } else {
            acsc.setCacheLoaderClassName(((LegacyLoaderConfiguration) loader).cacheLoader().getClass().getName());
         }
         return acsc;
      }
   }
View Full Code Here

      } else if (loader instanceof LegacyLoaderConfiguration) {
         CacheLoader cacheLoader = ((LegacyLoaderConfiguration) loader).cacheLoader();
         clc = getLoaderConfig(loader, cacheLoader);
      }
      if (clc instanceof AbstractCacheStoreConfig) {
         AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
         Properties p = loader.properties();
         acsc.setProperties(p);
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
         if (loader instanceof LegacyStoreConfiguration)
            acsc.purgerThreads(((LegacyStoreConfiguration)loader).purgerThreads());
      } else if (clc instanceof CacheLoaderConfig) {
         Properties p = loader.properties();
         if (p != null) XmlConfigHelper.setValues(clc, p, false, true);
      }
      return clc;
View Full Code Here

   private static CacheLoaderConfig getLoaderConfig(CacheLoaderConfiguration loader, CacheLoader cacheLoader) {
      if (cacheLoader.getClass().isAnnotationPresent(CacheLoaderMetadata.class)) {
         return Util.getInstance(cacheLoader.getClass().getAnnotation(CacheLoaderMetadata.class).configurationClass());
      } else {
         AbstractCacheStoreConfig acsc = new AbstractCacheStoreConfig();
         if (loader instanceof LegacyStoreConfiguration) {
            acsc.setCacheLoaderClassName(((LegacyStoreConfiguration) loader).cacheStore().getClass().getName());
         } else {
            acsc.setCacheLoaderClassName(((LegacyLoaderConfiguration) loader).cacheLoader().getClass().getName());
         }
         return acsc;
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.AbstractCacheStoreConfig

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.