Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.Configuration.invocationBatching()


            assert !newConfig.invocationBatching().enabled();

            builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", builder.build());
            assert newConfig2.invocationBatching().enabled();
            assert cm.getCache("new-cache").getCacheConfiguration().invocationBatching().enabled();
         }
      });
   }
View Full Code Here


      return txConfig != null && txConfig.transactionMode() == TransactionMode.TRANSACTIONAL;
   }

   protected boolean isCacheBatching(Cache<?, ?> cache) {
      Configuration config = cache.getCacheConfiguration();
      return config.invocationBatching().enabled();
   }

   @Override
   protected boolean isCacheAutoCommit(Cache<?, ?> cache) {
      TransactionConfiguration txConfig = cache.getCacheConfiguration().transaction();
View Full Code Here

   public void testDefineConfigurationTwice() {
      EmbeddedCacheManager cm = createCacheManager(false);
      try {
         Configuration override = new ConfigurationBuilder().invocationBatching().enable().build();
         assert override.invocationBatching().enabled();
         assert cm.defineConfiguration("test1", override).invocationBatching().enabled();
         ConfigurationBuilder cb = new ConfigurationBuilder();
         cb.read(override);
         Configuration config = cb.build();
         assert config.invocationBatching().enabled();
View Full Code Here

         assert override.invocationBatching().enabled();
         assert cm.defineConfiguration("test1", override).invocationBatching().enabled();
         ConfigurationBuilder cb = new ConfigurationBuilder();
         cb.read(override);
         Configuration config = cb.build();
         assert config.invocationBatching().enabled();
         assert cm.defineConfiguration("test2", config).invocationBatching().enabled();
      } finally {
         cm.stop();
      }
   }
View Full Code Here

         @Override
         public void call() {
            ConfigurationBuilder c = new ConfigurationBuilder();
            c.invocationBatching().enable(false);
            Configuration newConfig = cm.defineConfiguration("new-cache", c.build());
            assert !newConfig.invocationBatching().enabled();

            c = new ConfigurationBuilder();
            c.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", c.build());
            assert newConfig2.invocationBatching().enabled();
View Full Code Here

            assert !newConfig.invocationBatching().enabled();

            c = new ConfigurationBuilder();
            c.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", c.build());
            assert newConfig2.invocationBatching().enabled();
            assert cm.getCache("new-cache").getCacheConfiguration().invocationBatching().enabled();
         }
      });
   }
View Full Code Here

         @Override
         public void call() {
            ConfigurationBuilder builder = new ConfigurationBuilder();
            builder.invocationBatching().disable();
            Configuration newConfig = cm.defineConfiguration("new-cache", builder.build());
            assert !newConfig.invocationBatching().enabled();

            builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", builder.build());
            assert newConfig2.invocationBatching().enabled();
View Full Code Here

            assert !newConfig.invocationBatching().enabled();

            builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", builder.build());
            assert newConfig2.invocationBatching().enabled();
            assert cm.getCache("new-cache").getCacheConfiguration().invocationBatching().enabled();
         }
      });
   }
View Full Code Here

   public void testBatchingAndTransactionalCache() {
      ConfigurationBuilder cb = new ConfigurationBuilder();
      cb.invocationBatching().enable();
      final Configuration c = cb.build();

      assert c.invocationBatching().enabled();
      assert c.transaction().transactionMode().isTransactional();

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager()) {
         @Override
         public void call() {
View Full Code Here

            assertTrue(externalizer instanceof AdvancedExternalizerTest.IdViaAnnotationObj.Externalizer);
            assertEquals(ShutdownHookBehavior.DONT_REGISTER, g.shutdown().hookBehavior());

            // Default cache is "local" named cache
            Configuration c = cm.getCache().getCacheConfiguration();
            assertFalse(c.invocationBatching().enabled());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(CacheMode.LOCAL, c.clustering().cacheMode());
            assertEquals(30000, c.locking().lockAcquisitionTimeout());
            assertEquals(2000, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.NONE, c.locking().isolationLevel());
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.