Package org.infinispan.configuration.cache

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


            // Interval and max elements irrelevant since replication queue is disabled
            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


   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

            assertTrue(c.dataContainer().dataContainer() instanceof QueryableDataContainer);
            assertTrue(c.dataContainer().<byte[]>keyEquivalence() instanceof ByteArrayEquivalence);
            assertTrue(c.dataContainer().<byte[]>valueEquivalence() instanceof ByteArrayEquivalence);

            c = cm.getCache("store-as-binary").getCacheConfiguration();
            assertTrue(c.storeAsBinary().enabled());
            assertTrue(c.storeAsBinary().storeKeysAsBinary());
            assertFalse(c.storeAsBinary().storeValuesAsBinary());
         }
      });
   }
View Full Code Here

            assertTrue(c.dataContainer().<byte[]>keyEquivalence() instanceof ByteArrayEquivalence);
            assertTrue(c.dataContainer().<byte[]>valueEquivalence() instanceof ByteArrayEquivalence);

            c = cm.getCache("store-as-binary").getCacheConfiguration();
            assertTrue(c.storeAsBinary().enabled());
            assertTrue(c.storeAsBinary().storeKeysAsBinary());
            assertFalse(c.storeAsBinary().storeValuesAsBinary());
         }
      });
   }
View Full Code Here

            assertTrue(c.dataContainer().<byte[]>valueEquivalence() instanceof ByteArrayEquivalence);

            c = cm.getCache("store-as-binary").getCacheConfiguration();
            assertTrue(c.storeAsBinary().enabled());
            assertTrue(c.storeAsBinary().storeKeysAsBinary());
            assertFalse(c.storeAsBinary().storeValuesAsBinary());
         }
      });
   }

   public static final class CustomInterceptor1 extends CommandInterceptor {}
View Full Code Here

      Configuration configuration = defaultConfiguration.build();

      AssertJUnit
            .assertEquals(
                  "ConfigurationOverrides should have overridden default value with explicitly set UseLazyDeserialization property. However, it didn't.",
                  expectedUseLazyDeserialization, configuration.storeAsBinary().enabled());
   }

   public final void configurationOverridesShouldOverrideL1CacheEnabledPropIfExplicitlySet()
         throws Exception {
      final boolean expectedL1CacheEnabled = true;
View Full Code Here

      assertEquals(CacheMode.LOCAL, c.clustering().cacheMode());
      assertEquals(20000, c.locking().lockAcquisitionTimeout());
      assertEquals(1000, c.locking().concurrencyLevel());
      assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel());
      assertTrue(!c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("storeAsBinary");
      assertTrue(c.storeAsBinary().enabled());

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

      assertEquals(1000, c.locking().concurrencyLevel());
      assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel());
      assertTrue(!c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("storeAsBinary");
      assertTrue(c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("withFileStore");
      assertTrue(c.loaders().preload());
      assertTrue(!c.loaders().passivation());
      assertTrue(!c.loaders().shared());
View Full Code Here

      assertTrue(c.deadlockDetection().enabled());
      assertEquals(1221, c.deadlockDetection().spinDuration());
      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

      assertEquals(1221, c.deadlockDetection().spinDuration());
      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

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.