Examples of AsyncStoreConfig


Examples of org.infinispan.loader.decorators.AsyncStoreConfig

      }
      return ssc;
   }

   public AsyncStoreConfig parseAsyncStoreConfig(Element element) {
      AsyncStoreConfig asc = new AsyncStoreConfig();
      if (element == null) {
         asc.setEnabled(false);
      } else {
         boolean async = getBoolean(getAttributeValue(element, "enabled"));
         asc.setEnabled(async);

         if (async) {
            String tmp = getAttributeValue(element, "batchSize");
            if (existsAttribute(tmp)) asc.setBatchSize(getInt(tmp));

            tmp = getAttributeValue(element, "pollWait");
            if (existsAttribute(tmp)) asc.setPollWait(getLong(tmp));

            tmp = getAttributeValue(element, "queueSize");
            if (existsAttribute(tmp)) asc.setQueueSize(getInt(tmp));

            tmp = getAttributeValue(element, "threadPoolSize");
            if (existsAttribute(tmp)) asc.setThreadPoolSize(getInt(tmp));
         }
      }
      return asc;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

            csc.singletonStore()
               .enabled(singletonStoreConfig.isSingletonStoreEnabled())
               .pushStateTimeout(singletonStoreConfig.getPushStateTimeout());
         }

         AsyncStoreConfig asyncStoreConfig = storeConfig.getAsyncStoreConfig();
         if (asyncStoreConfig != null && asyncStoreConfig.isEnabled()) {
            csc.asyncStore()
                  .flushLockTimeout(asyncStoreConfig.getFlushLockTimeout())
                  .shutdownTimeout(asyncStoreConfig.getShutdownTimeout())
                  .threadPoolSize(asyncStoreConfig.getThreadPoolSize());
         }
      }
      return clc;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

      return stores;
   }

   private AsyncStore createAsyncStore() throws CacheLoaderException {
      DummyInMemoryCacheStore backendStore = createBackendStore("async2");
      AsyncStoreConfig asyncCfg = new AsyncStoreConfig();
      asyncCfg.modificationQueueSize(0);
      AsyncStore store = new AsyncStore(backendStore, asyncCfg);
      store.init(backendStore.getCacheStoreConfig(), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

            csc.singletonStore()
               .enabled(singletonStoreConfig.isSingletonStoreEnabled())
               .pushStateTimeout(singletonStoreConfig.getPushStateTimeout());
         }

         AsyncStoreConfig asyncStoreConfig = storeConfig.getAsyncStoreConfig();
         if (asyncStoreConfig != null && asyncStoreConfig.isEnabled()) {
            csc.asyncStore()
                  .flushLockTimeout(asyncStoreConfig.getFlushLockTimeout())
                  .shutdownTimeout(asyncStoreConfig.getShutdownTimeout())
                  .threadPoolSize(asyncStoreConfig.getThreadPoolSize())
                  .modificationQueueSize(asyncStoreConfig.getModificationQueueSize());
         }
      }
      return clc;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

      return stores;
   }

   private AsyncStore createAsyncStore() throws CacheLoaderException {
      DummyInMemoryCacheStore backendStore = createBackendStore("async2");
      AsyncStoreConfig asyncCfg = new AsyncStoreConfig();
      asyncCfg.modificationQueueSize(0);
      AsyncStore store = new AsyncStore(backendStore, asyncCfg);
      store.init(backendStore.getCacheStoreConfig(), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

      }
      return ssc;
   }

   public AsyncStoreConfig parseAsyncStoreConfig(Element element) {
      AsyncStoreConfig asc = new AsyncStoreConfig();
      if (element == null) {
         asc.setEnabled(false);
      } else {
         boolean async = getBoolean(getAttributeValue(element, "enabled"));
         asc.setEnabled(async);

         if (async) {
            String tmp = getAttributeValue(element, "batchSize");
            if (existsAttribute(tmp)) asc.setBatchSize(getInt(tmp));

            tmp = getAttributeValue(element, "pollWait");
            if (existsAttribute(tmp)) asc.setPollWait(getLong(tmp));

            tmp = getAttributeValue(element, "queueSize");
            if (existsAttribute(tmp)) asc.setQueueSize(getInt(tmp));

            tmp = getAttributeValue(element, "threadPoolSize");
            if (existsAttribute(tmp)) asc.setThreadPoolSize(getInt(tmp));
         }
      }
      return asc;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

      return stores;
   }

   private AsyncStore createAsyncStore() throws CacheLoaderException {
      DummyInMemoryCacheStore backendStore = createBackendStore("async2");
      AsyncStoreConfig asyncCfg = new AsyncStoreConfig();
      asyncCfg.modificationQueueSize(0);
      AsyncStore store = new AsyncStore(backendStore, asyncCfg);
      store.init(backendStore.getCacheStoreConfig(), null, new TestObjectStreamMarshaller());
      store.start();
      return store;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

         assert loaderManagerConfig.isShared();

         assert loaderManagerConfig.getCacheLoaderConfigs().size() == 1;
         CacheStoreConfig config = (CacheStoreConfig) loaderManagerConfig.getCacheLoaderConfigs().get(0);
         assert config.getCacheLoaderClassName().equals("org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore");
         AsyncStoreConfig asyncStoreConfig = config.getAsyncStoreConfig();
         assert asyncStoreConfig != null;
         assert asyncStoreConfig.isEnabled();
         assert config.isFetchPersistentState();
         assert config.isIgnoreModifications();
         assert config.isPurgeOnStartup();
         SingletonStoreConfig singletonStoreConfig = config.getSingletonStoreConfig();
         assert singletonStoreConfig != null;
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

            csc.singletonStore()
               .enabled(singletonStoreConfig.isSingletonStoreEnabled())
               .pushStateTimeout(singletonStoreConfig.getPushStateTimeout());
         }

         AsyncStoreConfig asyncStoreConfig = storeConfig.getAsyncStoreConfig();
         if (asyncStoreConfig != null && asyncStoreConfig.isEnabled()) {
            csc.asyncStore()
                  .flushLockTimeout(asyncStoreConfig.getFlushLockTimeout())
                  .shutdownTimeout(asyncStoreConfig.getShutdownTimeout())
                  .threadPoolSize(asyncStoreConfig.getThreadPoolSize())
                  .modificationQueueSize(asyncStoreConfig.getModificationQueueSize());
         }
      }
      return clc;
   }
View Full Code Here

Examples of org.infinispan.loaders.decorators.AsyncStoreConfig

            csc.singletonStore()
               .enabled(singletonStoreConfig.isSingletonStoreEnabled())
               .pushStateTimeout(singletonStoreConfig.getPushStateTimeout());
         }

         AsyncStoreConfig asyncStoreConfig = storeConfig.getAsyncStoreConfig();
         if (asyncStoreConfig != null && asyncStoreConfig.isEnabled()) {
            csc.asyncStore()
                  .flushLockTimeout(asyncStoreConfig.getFlushLockTimeout())
                  .shutdownTimeout(asyncStoreConfig.getShutdownTimeout())
                  .threadPoolSize(asyncStoreConfig.getThreadPoolSize())
                  .modificationQueueSize(asyncStoreConfig.getModificationQueueSize());
         }
      }
      return clc;
   }
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.