Package org.infinispan.configuration.cache

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


    @Override
    protected ConfigurationBuilder getConfigurationBuilder() {
        Configuration config = this.configuration.getValue();
        ConfigurationBuilder builder = new ConfigurationBuilder().read(config);
        builder.storeAsBinary().disable().storeKeysAsBinary(false).storeValuesAsBinary(false);
        builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ);
        return builder;
    }

    @Override
View Full Code Here


    @Override
    protected ConfigurationBuilder getConfigurationBuilder() {
        Configuration config = this.configuration.getValue();
        ConfigurationBuilder builder = new ConfigurationBuilder().read(config);
        builder.storeAsBinary().disable().storeKeysAsBinary(false).storeValuesAsBinary(false);
        builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ);
        return builder;
    }

    @Override
View Full Code Here

   }

   public org.infinispan.configuration.cache.Configuration build() {
      ConfigurationBuilder cb = new ConfigurationBuilder();
      if (c.isStoreByValue())
         cb.storeAsBinary().enable().defensive(true);

      switch (c.getTransactionMode()) {
         case NONE:
            cb.transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL);
            break;
View Full Code Here

public class DefensiveCopyTest extends SingleCacheManagerTest {

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable().defensive(true);
      return TestCacheManagerFactory.createCacheManager(builder);
   }

   public void testOriginalReferenceSafety() {
      final Integer k = 1;
View Full Code Here

      //Verification for ISPN-2386 - the following exception should not appear:
      //java.lang.ClassCastException: org.infinispan.marshall.MarshalledValue cannot be cast to org.infinispan.distexec.mapreduce.Book

      builder.eviction().maxEntries(1).strategy(EvictionStrategy.LRU);
      builder.loaders().passivation(true).addStore().cacheStore(new DummyInMemoryCacheStore(getClass().getSimpleName()));
      builder.storeAsBinary().enable();

      createClusteredCaches(4, "bookSearch", builder);
   }

}
View Full Code Here

         "' can not use Cache '" + CACHE_NAME + "': store as binary enabled on the Cache configuration!";

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE_EXP)
   public void failOnStoreKeysAsBinary() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable().storeKeysAsBinary(true);
      failIfStoreAsBinaryEnabled(builder);
   }

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE_EXP)
   public void failOnStoreValuesAsBinary() {
View Full Code Here

   }

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE_EXP)
   public void failOnStoreValuesAsBinary() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable().storeValuesAsBinary(true);
      failIfStoreAsBinaryEnabled(builder);
   }

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE_EXP)
   public void failOnStoreKeysAndValuesAsBinary() {
View Full Code Here

   }

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = ERROR_MESSAGE_EXP)
   public void failOnStoreKeysAndValuesAsBinary() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable()
            .storeValuesAsBinary(true)
            .storeKeysAsBinary(true);
      failIfStoreAsBinaryEnabled(builder);
   }
View Full Code Here

public class MarshallerPickAfterCacheRestart extends MultipleCacheManagersTest {

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable()
            .clustering()
               .cacheMode(CacheMode.REPL_SYNC)
               .stateTransfer().fetchInMemoryState(false);

      createCluster(builder, 2);
View Full Code Here

public class DefensiveCopyTest extends SingleCacheManagerTest {

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.storeAsBinary().enable();
      return TestCacheManagerFactory.createCacheManager(builder);
   }

   public void testOriginalReferenceSafety() {
      final Integer k = 1;
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.