Examples of async()


Examples of org.infinispan.configuration.cache.FileCacheStoreConfiguration.async()

      assertEquals(2000, loaderCfg.fsyncInterval());
      assertEquals(20000, loaderCfg.singletonStore().pushStateTimeout());
      assertTrue(loaderCfg.singletonStore().pushStateWhenCoordinator());
      assertEquals(5, loaderCfg.async().threadPoolSize());
      assertEquals(15000, loaderCfg.async().flushLockTimeout());
      assertTrue(loaderCfg.async().enabled());
      assertEquals(700, loaderCfg.async().modificationQueueSize());

      c = cm.getCacheConfiguration("withClusterLoader");
      assertEquals(1, c.loaders().cacheLoaders().size());
      ClusterCacheLoaderConfiguration clusterLoaderCfg = (ClusterCacheLoaderConfiguration) c.loaders().cacheLoaders().get(0);
View Full Code Here

Examples of org.infinispan.configuration.cache.FileCacheStoreConfiguration.async()

      assertEquals(20000, loaderCfg.singletonStore().pushStateTimeout());
      assertTrue(loaderCfg.singletonStore().pushStateWhenCoordinator());
      assertEquals(5, loaderCfg.async().threadPoolSize());
      assertEquals(15000, loaderCfg.async().flushLockTimeout());
      assertTrue(loaderCfg.async().enabled());
      assertEquals(700, loaderCfg.async().modificationQueueSize());

      c = cm.getCacheConfiguration("withClusterLoader");
      assertEquals(1, c.loaders().cacheLoaders().size());
      ClusterCacheLoaderConfiguration clusterLoaderCfg = (ClusterCacheLoaderConfiguration) c.loaders().cacheLoaders().get(0);
      assertEquals(15000, clusterLoaderCfg.remoteCallTimeout());
View Full Code Here

Examples of org.infinispan.configuration.cache.FileCacheStoreConfiguration.async()

               assert loaders.shared();

               assert loaders.cacheLoaders().size() == 1;

               FileCacheStoreConfiguration fcsc = (FileCacheStoreConfiguration) loaders.cacheLoaders().get(0);
               assert fcsc.async().enabled();
               assert fcsc.fetchPersistentState();
               assert fcsc.ignoreModifications();
               assert fcsc.purgeOnStartup();
               assert fcsc.singletonStore().enabled();
            }
View Full Code Here

Examples of org.infinispan.configuration.cache.LegacyStoreConfigurationBuilder.async()

      cb.loaders().passivation(false).preload(true).shared(true);
      // Make it really shared by adding the test's name as store name
      LegacyStoreConfigurationBuilder sb = cb.loaders().addStore().cacheStore(
            new DummyInMemoryCacheStore());
      sb.addProperty("storeName", getClass().getSimpleName());
      sb.async().disable();
      return cb;
   }

   @Override
   protected void createCacheManagers() throws Throwable {
View Full Code Here

Examples of org.infinispan.configuration.cache.LoaderConfigurationBuilder.async()

            ;
            storeBuilder.singletonStore().enabled(singleton);

            if(async) {
                ModelNode writeBehind = store.get(ModelKeys.WRITE_BEHIND, ModelKeys.WRITE_BEHIND_NAME);
                storeBuilder.async().enable()
                    .flushLockTimeout(CommonAttributes.FLUSH_LOCK_TIMEOUT.resolveModelAttribute(context, writeBehind).asLong())
                    .modificationQueueSize(CommonAttributes.MODIFICATION_QUEUE_SIZE.resolveModelAttribute(context, writeBehind).asInt())
                    .shutdownTimeout(CommonAttributes.SHUTDOWN_TIMEOUT.resolveModelAttribute(context, writeBehind).asLong())
                    .threadPoolSize(CommonAttributes.THREAD_POOL_SIZE.resolveModelAttribute(context, writeBehind).asInt());
            }
View Full Code Here

Examples of org.infinispan.configuration.cache.SingleFileStoreConfiguration.async()

      assertTrue(loaderCfg.fetchPersistentState());
      assertTrue(loaderCfg.ignoreModifications());
      assertTrue(loaderCfg.purgeOnStartup());
      assertEquals("/tmp/FileCacheStore-Location", loaderCfg.location());
      assertEquals(5, loaderCfg.async().threadPoolSize());
      assertEquals(15000, loaderCfg.async().flushLockTimeout());
      assertTrue(loaderCfg.async().enabled());
      assertEquals(700, loaderCfg.async().modificationQueueSize());

      c = cm.getCacheConfiguration("withClusterLoader");
View Full Code Here

Examples of org.infinispan.configuration.cache.StoreConfigurationBuilder.async()

      ConfigurationBuilder config = new ConfigurationBuilder();
      config.expiration().wakeUpInterval(100);
      config.eviction().maxEntries(1).strategy(EvictionStrategy.LRU);
      StoreConfigurationBuilder store = config.loaders().passivation(passivation).addStore().cacheStore(new LockableCacheStore());
      if (USE_ASYNC_STORE)
         store.async().enable().threadPoolSize(threads);
      return config;
   }

   private final static ThreadLocal<LockableCacheStore> STORE = new ThreadLocal<LockableCacheStore>();
View Full Code Here

Examples of org.infinispan.loaders.jdbc.configuration.JdbcStringBasedCacheStoreConfiguration.async()

            assert jscs.table().idColumnType().equals("VARCHAR");
            assert jscs.table().dataColumnName().equals("datum");
            assert jscs.table().dataColumnType().equals("BINARY");
            assert jscs.table().timestampColumnName().equals("version");
            assert jscs.table().timestampColumnType().equals("BIGINT");
            assert jscs.async().enabled();
            assert jscs.async().flushLockTimeout() == 1;
            assert jscs.async().modificationQueueSize() == 1024;
            assert jscs.async().shutdownTimeout() == 25000;
            assert jscs.async().threadPoolSize() == 1;
View Full Code Here

Examples of org.infinispan.loaders.remote.configuration.RemoteCacheStoreConfiguration.async()

            assert !rcsc.purgeOnStartup();
            assert rcsc.servers().size() == 1;
            RemoteServerConfiguration server = rcsc.servers().get(0);
            assert server.host().equals("remote-host");
            assert server.port() == 11222;
            assert rcsc.async().enabled();
            assert rcsc.async().flushLockTimeout() == 1;
            assert rcsc.async().modificationQueueSize() == 1024;
            assert rcsc.async().shutdownTimeout() == 25000;
            assert rcsc.async().threadPoolSize() == 1;
         }
View Full Code Here

Examples of org.infinispan.persistence.dummy.DummyInMemoryStoreConfigurationBuilder.async()

    */
   private void test(boolean async) {
      ConfigurationBuilder dcc = TestCacheManagerFactory.getDefaultCacheConfiguration(true);
      DummyInMemoryStoreConfigurationBuilder builder = dcc.persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class);
      if (async) {
         builder.async().enable();
      }
      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createCacheManager(dcc);
      Cache<Object,Object> cache = cacheManager.getCache();

      try {
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.