Package org.infinispan.loaders

Examples of org.infinispan.loaders.CacheStoreConfig


   private boolean hasAsyncStore() {
      List<CacheLoaderConfig> loaderConfigs = configuration.getCacheLoaderManagerConfig().getCacheLoaderConfigs();
      for (CacheLoaderConfig loaderConfig : loaderConfigs) {
         if (loaderConfig instanceof CacheStoreConfig) {
            CacheStoreConfig storeConfig = (CacheStoreConfig) loaderConfig;
            if (storeConfig.getAsyncStoreConfig().isEnabled())
               return true;
         }
      }
      return false;
   }
View Full Code Here


            String location = loader.properties().getProperty("location");
            if (location != null)
               fcsc.location(location);
         }
         if (clc instanceof CacheStoreConfig) {
            CacheStoreConfig csc = (CacheStoreConfig) clc;
            csc.fetchPersistentState(loader.fetchPersistentState());
            csc.ignoreModifications(loader.ignoreModifications());
            csc.purgeOnStartup(loader.purgeOnStartup())
            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.getSingletonStoreConfig().enabled(loader.singletonStore().enabled());
            csc.getSingletonStoreConfig().pushStateTimeout(loader.singletonStore().pushStateTimeout());
            csc.getSingletonStoreConfig().pushStateWhenCoordinator(loader.singletonStore().pushStateWhenCoordinator());
         }
         if (clc instanceof AbstractCacheStoreConfig) {
            AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
            Properties p = loader.properties();
            acsc.setProperties(p);
View Full Code Here

      for (CacheLoaderConfig clc : legacy.getCacheLoaders()) {
         LoaderConfigurationBuilder loaderBuilder = builder.loaders().addCacheLoader();
         loaderBuilder.cacheLoader(Util.<CacheLoader>getInstance(clc.getCacheLoaderClassName(), legacy.getClassLoader()));
         if (clc instanceof CacheStoreConfig) {
            CacheStoreConfig csc = (CacheStoreConfig) clc;
            loaderBuilder.fetchPersistentState(csc.isFetchPersistentState());
            loaderBuilder.ignoreModifications(csc.isIgnoreModifications());
            loaderBuilder.purgeOnStartup(csc.isPurgeOnStartup());
            loaderBuilder.purgerThreads(csc.getPurgerThreads());
            loaderBuilder.purgeSynchronously(csc.isPurgeSynchronously());
            loaderBuilder.async().enabled(csc.getAsyncStoreConfig().isEnabled());
            loaderBuilder.async().flushLockTimeout(csc.getAsyncStoreConfig().getFlushLockTimeout());
            loaderBuilder.async().modificationQueueSize(csc.getAsyncStoreConfig().getModificationQueueSize());
            loaderBuilder.async().shutdownTimeout(csc.getAsyncStoreConfig().getShutdownTimeout());
            loaderBuilder.async().threadPoolSize(csc.getAsyncStoreConfig().getThreadPoolSize());
           
            loaderBuilder.singletonStore().enabled(csc.getSingletonStoreConfig().isSingletonStoreEnabled());
            loaderBuilder.singletonStore().pushStateTimeout(csc.getSingletonStoreConfig().getPushStateTimeout());
            loaderBuilder.singletonStore().pushStateWhenCoordinator(csc.getSingletonStoreConfig().isPushStateWhenCoordinator());
         }
         if (clc instanceof AbstractCacheStoreConfig) {
            loaderBuilder.withProperties(((AbstractCacheLoaderConfig) clc).getProperties());
         }
      }
View Full Code Here

   private boolean hasAsyncStore() {
      List<CacheLoaderConfig> loaderConfigs = configuration.getCacheLoaderManagerConfig().getCacheLoaderConfigs();
      for (CacheLoaderConfig loaderConfig : loaderConfigs) {
         if (loaderConfig instanceof CacheStoreConfig) {
            CacheStoreConfig storeConfig = (CacheStoreConfig) loaderConfig;
            if (storeConfig.getAsyncStoreConfig().isEnabled())
               return true;
         }
      }
      return false;
   }
View Full Code Here

   private boolean hasAsyncStore() {
      List<CacheLoaderConfig> loaderConfigs = configuration.getCacheLoaderManagerConfig().getCacheLoaderConfigs();
      for (CacheLoaderConfig loaderConfig : loaderConfigs) {
         if (loaderConfig instanceof CacheStoreConfig) {
            CacheStoreConfig storeConfig = (CacheStoreConfig) loaderConfig;
            if (storeConfig.getAsyncStoreConfig().isEnabled())
               return true;
         }
      }
      return false;
   }
View Full Code Here

            String location = loader.properties().getProperty("location");
            if (location != null)
               fcsc.location(location);
         }
         if (clc instanceof CacheStoreConfig) {
            CacheStoreConfig csc = (CacheStoreConfig) clc;
            csc.fetchPersistentState(loader.fetchPersistentState());
            csc.ignoreModifications(loader.ignoreModifications());
            csc.purgeOnStartup(loader.purgeOnStartup())
            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.getSingletonStoreConfig().enabled(loader.singletonStore().enabled());
            csc.getSingletonStoreConfig().pushStateTimeout(loader.singletonStore().pushStateTimeout());
            csc.getSingletonStoreConfig().pushStateWhenCoordinator(loader.singletonStore().pushStateWhenCoordinator());
         }
         if (clc instanceof AbstractCacheStoreConfig) {
            AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
            Properties p = loader.properties();
            acsc.setProperties(p);
View Full Code Here

      for (CacheLoaderConfig clc : legacy.getCacheLoaders()) {
         LoaderConfigurationBuilder loaderBuilder = builder.loaders().addCacheLoader();
         loaderBuilder.cacheLoader(Util.<CacheLoader>getInstance(clc.getCacheLoaderClassName(), legacy.getClassLoader()));
         if (clc instanceof CacheStoreConfig) {
            CacheStoreConfig csc = (CacheStoreConfig) clc;
            loaderBuilder.fetchPersistentState(csc.isFetchPersistentState());
            loaderBuilder.ignoreModifications(csc.isIgnoreModifications());
            loaderBuilder.purgeOnStartup(csc.isPurgeOnStartup());
            loaderBuilder.purgerThreads(csc.getPurgerThreads());
            loaderBuilder.purgeSynchronously(csc.isPurgeSynchronously());
            loaderBuilder.async().enabled(csc.getAsyncStoreConfig().isEnabled());
            loaderBuilder.async().flushLockTimeout(csc.getAsyncStoreConfig().getFlushLockTimeout());
            loaderBuilder.async().modificationQueueSize(csc.getAsyncStoreConfig().getModificationQueueSize());
            loaderBuilder.async().shutdownTimeout(csc.getAsyncStoreConfig().getShutdownTimeout());
            loaderBuilder.async().threadPoolSize(csc.getAsyncStoreConfig().getThreadPoolSize());
           
            loaderBuilder.singletonStore().enabled(csc.getSingletonStoreConfig().isSingletonStoreEnabled());
            loaderBuilder.singletonStore().pushStateTimeout(csc.singletonStore().getPushStateTimeout());
            loaderBuilder.singletonStore().pushStateWhenCoordinator(csc.singletonStore().isPushStateWhenCoordinator());
         }
         if (clc instanceof AbstractCacheStoreConfig) {
            loaderBuilder.withProperties(((AbstractCacheLoaderConfig) clc).getProperties());
         }
      }
View Full Code Here

   private boolean hasAsyncStore() {
      List<CacheLoaderConfig> loaderConfigs = configuration.getCacheLoaderManagerConfig().getCacheLoaderConfigs();
      for (CacheLoaderConfig loaderConfig : loaderConfigs) {
         if (loaderConfig instanceof CacheStoreConfig) {
            CacheStoreConfig storeConfig = (CacheStoreConfig) loaderConfig;
            if (storeConfig.getAsyncStoreConfig().isEnabled())
               return true;
         }
      }
      return false;
   }
View Full Code Here

   private boolean hasAsyncStore() {
      List<CacheLoaderConfig> loaderConfigs = configuration.getCacheLoaderManagerConfig().getCacheLoaderConfigs();
      for (CacheLoaderConfig loaderConfig : loaderConfigs) {
         if (loaderConfig instanceof CacheStoreConfig) {
            CacheStoreConfig storeConfig = (CacheStoreConfig) loaderConfig;
            if (storeConfig.getAsyncStoreConfig().isEnabled())
               return true;
         }
      }
      return false;
   }
View Full Code Here

                ModelNode store = cache.get(storeKey);
                FluentConfiguration.LoadersConfig fluentStores = fluent.loaders();
                fluentStores.shared(store.hasDefined(ModelKeys.SHARED) ? store.get(ModelKeys.SHARED).asBoolean() : false);
                fluentStores.preload(store.hasDefined(ModelKeys.PRELOAD) ? store.get(ModelKeys.PRELOAD).asBoolean() : false);
                fluentStores.passivation(store.hasDefined(ModelKeys.PASSIVATION) ? store.get(ModelKeys.PASSIVATION).asBoolean() : true);
                CacheStoreConfig storeConfig = buildCacheStore(name, builder, store, storeKey);
                storeConfig.singletonStore().enabled(store.hasDefined(ModelKeys.SINGLETON) ? store.get(ModelKeys.SINGLETON).asBoolean() : false);
                storeConfig.fetchPersistentState(store.hasDefined(ModelKeys.FETCH_STATE) ? store.get(ModelKeys.FETCH_STATE).asBoolean() : true);
                storeConfig.purgeOnStartup(store.hasDefined(ModelKeys.PURGE) ? store.get(ModelKeys.PURGE).asBoolean() : true);
                fluentStores.addCacheLoader(storeConfig);
            }
            configurations.put(cacheName, configuration);

            StartMode startMode = cache.hasDefined(ModelKeys.START) ? StartMode.valueOf(cache.get(ModelKeys.START).asString()) : StartMode.LAZY;
View Full Code Here

TOP

Related Classes of org.infinispan.loaders.CacheStoreConfig

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.