Package org.infinispan.configuration.cache

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


   public void testNoFailWithSharedCacheLoader() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.clustering()
            .cacheMode(CacheMode.REPL_SYNC)
            .stateTransfer().fetchInMemoryState(false);
      builder.persistence()
            .addStore(DummyInMemoryStoreConfigurationBuilder.class).fetchPersistentState(false).preload(true).shared(true);
      doConfigurationTest(builder);
   }

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


   public void testNoFailWithPassivationCacheLoader() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.clustering()
            .cacheMode(CacheMode.REPL_SYNC)
            .stateTransfer().fetchInMemoryState(false);
      builder.persistence()
            .passivation(true)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class).fetchPersistentState(false).preload(true);
      doConfigurationTest(builder);
   }
View Full Code Here

   public void testNoFailWithPassivationCacheLoader2() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.clustering()
            .cacheMode(CacheMode.REPL_SYNC)
            .stateTransfer().fetchInMemoryState(false);
      builder.persistence()
            .passivation(true)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class).fetchPersistentState(true).preload(true);
      doConfigurationTest(builder);
   }
View Full Code Here

   public void testNoFailWithPassivationCacheLoader3() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.clustering()
            .cacheMode(CacheMode.REPL_SYNC)
            .stateTransfer().fetchInMemoryState(true);
      builder.persistence()
            .passivation(true)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class).fetchPersistentState(false).preload(true);
      doConfigurationTest(builder);
   }
View Full Code Here

   public void testNoFailWithPassivationCacheLoader4() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.clustering()
            .cacheMode(CacheMode.REPL_SYNC)
            .stateTransfer().fetchInMemoryState(true);
      builder.persistence()
            .passivation(true)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class).fetchPersistentState(true).preload(true);
      doConfigurationTest(builder);
   }
View Full Code Here

         expectedExceptionsMessageRegExp = "ISPN(\\d)*: Lucene Directory for index '" + INDEX_NAME +
               "' can not use Metadata Cache '" + CACHE_NAME + "': persistence enabled without preload on the Cache " +
               "configuration!")
   public void testFailOnPersistenceWithoutPreload() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class).preload(false);
      doConfigurationTest(builder);
   }

   public void testSuccessfullConfiguration() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
View Full Code Here

      doConfigurationTest(builder);
   }

   public void testSuccessfullConfiguration() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class).preload(true);
      builder.eviction().strategy(EvictionStrategy.NONE).maxEntries(-1);
      doConfigurationTest(builder);
   }

   private void doConfigurationTest(ConfigurationBuilder configuration) {
View Full Code Here

      return TestCacheManagerFactory.createCacheManager(TestCacheManagerFactory.getDefaultCacheConfiguration(true));
   }

   private CacheContainer createCacheContainerWithStore(String location) {
      ConfigurationBuilder b = new ConfigurationBuilder();
      b.persistence().addSingleFileStore().location(location);
      return TestCacheManagerFactory.createCacheManager(b);
   }

   private void doTestEntrySetAfterExpiryInPut(Method m, CacheContainer cc) throws Exception {
      Cache<Integer, String> cache = cc.getCache();
View Full Code Here

   // Methods to build the String and Binary Configurations.

   private JdbcStringBasedStoreConfiguration buildStringStoreConfiguration(JdbcMixedStoreConfiguration configuration){
      ConfigurationBuilder builder = new ConfigurationBuilder();
      JdbcStringBasedStoreConfigurationBuilder stringBuilder = builder.persistence().addStore
            (JdbcStringBasedStoreConfigurationBuilder.class).manageConnectionFactory(false);
      stringBuilder.
            key2StringMapper(configuration.key2StringMapper()).
            table().read(configuration.stringTable());
View Full Code Here

      return stringBuilder.create();
   }

   private JdbcBinaryStoreConfiguration buildBinaryStoreConfiguration(JdbcMixedStoreConfiguration configuration) {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      JdbcBinaryStoreConfigurationBuilder binaryBuilder = builder.persistence().addStore
            (JdbcBinaryStoreConfigurationBuilder.class).manageConnectionFactory(false);
      binaryBuilder.table().read(configuration.binaryTable());
      return binaryBuilder.create();
   }
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.