Package org.infinispan.configuration.cache

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


      ConfigurationBuilder builder = holder.getCurrentConfigurationBuilder();

      Element element = Element.forName(reader.getLocalName());
      switch (element) {
      case STRING_KEYED_JDBC_STORE: {
         parseStringKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
View Full Code Here


      case STRING_KEYED_JDBC_STORE: {
         parseStringKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case MIXED_KEYED_JDBC_STORE: {
         parseMixedKeyedJdbcStore(reader, builder.persistence());
         break;
View Full Code Here

      case BINARY_KEYED_JDBC_STORE: {
         parseBinaryKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      case MIXED_KEYED_JDBC_STORE: {
         parseMixedKeyedJdbcStore(reader, builder.persistence());
         break;
      }
      default: {
         throw ParseUtils.unexpectedElement(reader);
      }
View Full Code Here

   }

   @Before
   public void setUp() throws Exception {
      ConfigurationBuilder builder = getDefaultStandaloneCacheConfig(false);
      builder.persistence().passivation(true).addStore(DummyInMemoryStoreConfigurationBuilder.class);
      cacheManager = TestCacheManagerFactory.createCacheManager(builder);
      if (cache == null) cache = cacheManager.getCache();
   }

   @After
View Full Code Here

   }

   private EmbeddedCacheManager createTargetCacheManager() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      // Configure target cache manager with the CLI cache loader pointing to source
      builder.persistence()
            .addStore(CLInterfaceLoaderConfigurationBuilder.class)
            .connectionString(SOURCE_CONNECTION_STRING);

      return TestCacheManagerFactory.createCacheManager(builder);
   }
View Full Code Here

@Test(groups = "unit", testName = "persistence.remote.configuration.ConfigurationTest")
public class ConfigurationTest {

   public void testCacheLoaderConfiguration() {
      ConfigurationBuilder b = new ConfigurationBuilder();
      b.persistence().addStore(CLInterfaceLoaderConfigurationBuilder.class)
         .connectionString("jmx://1.2.3.4:4444/MyCacheManager/myCache");
      Configuration configuration = b.build();
      CLInterfaceLoaderConfiguration store = (CLInterfaceLoaderConfiguration)
            configuration.persistence().stores().get(0);
      assertEquals("jmx://1.2.3.4:4444/MyCacheManager/myCache", store.connectionString());
View Full Code Here

public class JpaStoreTest extends BaseStoreTest {

   @Override
   protected AdvancedLoadWriteStore createStore() throws Exception {
      ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      builder.persistence()
                  .addStore(JpaStoreConfigurationBuilder.class)
                     .persistenceUnitName(getPersistenceUnitName())
                     .entityClass(KeyValueEntity.class)
                     .storeMetadata(storeMetadata())
                     .create();
View Full Code Here

      sourceServerCache = sourceContainer.getCache();
      sourceServer = TestHelper.startHotRodServer(sourceContainer);

      ConfigurationBuilder targetConfigurationBuilder = hotRodCacheConfiguration(
            TestCacheManagerFactory.getDefaultCacheConfiguration(false));
      targetConfigurationBuilder.persistence().addStore(RemoteStoreConfigurationBuilder.class).hotRodWrapping(true).addServer().host("localhost").port(sourceServer.getPort());

      targetContainer = TestCacheManagerFactory.createCacheManager(targetConfigurationBuilder);
      targetServerCache = targetContainer.getCache();
      targetServer = TestHelper.startHotRodServer(targetContainer);
View Full Code Here

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

   public void testNoFailWithCacheLoaderAndFetchInMemoryState() {
View Full Code Here

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

   public void testNoFailWithSharedCacheLoader() {
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.