Package org.infinispan.configuration.cache

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


      assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());

      c = cm.getCacheConfiguration("storeKeyValueBinary");
      assertTrue(c.storeAsBinary().enabled());
      assertTrue(c.storeAsBinary().storeKeysAsBinary());
      assertTrue(!c.storeAsBinary().storeValuesAsBinary());

      Configuration withJDBCLoader = cm.getCacheConfiguration("withJDBCLoader");
      assertTrue(withJDBCLoader.locking().supportsConcurrentUpdates());
   }
View Full Code Here


      InputStream is = new ByteArrayInputStream(config.getBytes());
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromStream(is)) {
         @Override
         public void call() {
            Configuration cfg = cm.getDefaultCacheConfiguration();
            assertTrue(cfg.storeAsBinary().enabled());
            assertTrue(cfg.storeAsBinary().defensive());
         }
      });

      config = INFINISPAN_START_TAG_NO_SCHEMA +
View Full Code Here

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromStream(is)) {
         @Override
         public void call() {
            Configuration cfg = cm.getDefaultCacheConfiguration();
            assertTrue(cfg.storeAsBinary().enabled());
            assertTrue(cfg.storeAsBinary().defensive());
         }
      });

      config = INFINISPAN_START_TAG_NO_SCHEMA +
            "<default>\n" +
View Full Code Here

      is = new ByteArrayInputStream(config.getBytes());
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromStream(is)) {
         @Override
         public void call() {
            Configuration cfg = cm.getDefaultCacheConfiguration();
            assertTrue(cfg.storeAsBinary().enabled());
            assertTrue(!cfg.storeAsBinary().defensive());
         }
      });
   }
View Full Code Here

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromStream(is)) {
         @Override
         public void call() {
            Configuration cfg = cm.getDefaultCacheConfiguration();
            assertTrue(cfg.storeAsBinary().enabled());
            assertTrue(!cfg.storeAsBinary().defensive());
         }
      });
   }

   public void testCompatibility() throws Exception {
View Full Code Here

               assert globalConfig.shutdown().hookBehavior().equals(ShutdownHookBehavior.DONT_REGISTER);
               assert globalConfig.asyncListenerExecutor().properties().get("maxThreads").equals("123");
               assert globalConfig.asyncListenerExecutor().properties().get("queueSize").equals("1020000");
               assert !defaultConfig.invocationBatching().enabled();
               assert globalConfig.serialization().marshaller().getClass().equals(VersionAwareMarshaller.class);
               assert defaultConfig.storeAsBinary().enabled();

               assert globalConfig.transport().clusterName().equals("JBossCache-cluster");
               assert defaultConfig.clustering().cacheMode().equals(CacheMode.INVALIDATION_SYNC);
               assert defaultConfig.clustering().stateTransfer().timeout() == 2120000;
View Full Code Here

            Assert.assertEquals(c.clustering().stateTransfer().fetchInMemoryState(), true);
            Assert.assertEquals(c.clustering().sync().replTimeout(), 30000);
            Assert.assertEquals(c.locking().isolationLevel(), IsolationLevel.READ_COMMITTED);
            Assert.assertEquals(c.locking().concurrencyLevel(), 30);
            Assert.assertEquals(c.locking().lockAcquisitionTimeout(), 25000);
            Assert.assertEquals(c.storeAsBinary().enabled(), false);

            // Following should have been taken over from first cache
            Assert.assertEquals(c.expiration().wakeUpInterval(), 23);
            Assert.assertEquals(c.expiration().lifespan(), 50012);
            Assert.assertEquals(c.expiration().maxIdle(), 1341);
View Full Code Here

            Assert.assertEquals(c.clustering().stateTransfer().fetchInMemoryState(), true);
            Assert.assertEquals(c.clustering().sync().replTimeout(), 30000);
            Assert.assertEquals(c.locking().isolationLevel(), IsolationLevel.READ_COMMITTED);
            Assert.assertEquals(c.locking().concurrencyLevel(), 30);
            Assert.assertEquals(c.locking().lockAcquisitionTimeout(), 25000);
            Assert.assertEquals(c.storeAsBinary().enabled(), false);

            // Following should have been taken over from first cache
            Assert.assertEquals(c.expiration().wakeUpInterval(), 23);
            Assert.assertEquals(c.expiration().lifespan(), 50012);
            Assert.assertEquals(c.expiration().maxIdle(), 1341);
View Full Code Here

   public void testOverrideStoreAsBinary() throws Exception {
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromXml("configs/named-cache-override-test.xml")) {
         @Override
         public void call() {
            Configuration cnf = cm.getCacheConfiguration(simpleCacheName);
            Assert.assertFalse(cnf.storeAsBinary().enabled());

            Configuration conf = new ConfigurationBuilder().storeAsBinary().enable().defensive(true).build();

            cm.defineConfiguration(simpleCacheName, conf);
View Full Code Here

            Assert.assertEquals(c.clustering().async().replQueueMaxElements(), 341);
            Assert.assertEquals(c.jmxStatistics().enabled(), true);
            Assert.assertEquals(c.locking().isolationLevel(), IsolationLevel.READ_COMMITTED);
            Assert.assertEquals(c.locking().concurrencyLevel(), 30);
            Assert.assertEquals(c.locking().lockAcquisitionTimeout(), 25000);
            Assert.assertEquals(c.storeAsBinary().enabled(), false);
            Assert.assertEquals(c.expiration().wakeUpInterval(), 23);
            Assert.assertEquals(c.expiration().lifespan(), 50012);
            Assert.assertEquals(c.expiration().maxIdle(), 1341);
            Assert.assertEquals(c.deadlockDetection().enabled(), true);
            Assert.assertEquals(c.deadlockDetection().spinDuration(), 1224);
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.