Package org.infinispan.configuration.cache

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


            hotRodCacheConfiguration(serverBuilder));
      serverCache = serverCacheManager.getCache();
      hrServer = TestHelper.startHotRodServer(serverCacheManager);

      ConfigurationBuilder clientBuilder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      clientBuilder.persistence().addStore(RemoteStoreConfigurationBuilder.class)
         .rawValues(true)
         .addServer()
            .host(hrServer.getHost())
            .port(hrServer.getPort());
      clientCacheManager = TestCacheManagerFactory.createCacheManager(clientBuilder);
View Full Code Here


      gcr.rewire();
      localCacheManager.getCache(REMOTE_CACHE).getAdvancedCache().getComponentRegistry().rewire();
      hrServer = TestHelper.startHotRodServer(localCacheManager);

      ConfigurationBuilder builder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      RemoteStoreConfigurationBuilder storeConfigurationBuilder = builder
            .persistence()
               .addStore(RemoteStoreConfigurationBuilder.class)
                  .rawValues(true)
                  .remoteCacheName(REMOTE_CACHE);
      storeConfigurationBuilder
View Full Code Here

      remoteSourceCacheManager = TestHelper.getRemoteCacheManager(sourceServer);
      remoteSourceCacheManager.start();
      remoteSourceCache = remoteSourceCacheManager.getCache();

      ConfigurationBuilder clientBuilder = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      clientBuilder.persistence().addStore(RemoteStoreConfigurationBuilder.class)
         .hotRodWrapping(true)
         .addServer()
            .host(sourceServer.getHost())
            .port(sourceServer.getPort());
      targetCacheManager = TestCacheManagerFactory
View Full Code Here

      localCacheManager.getCache(REMOTE_CACHE).getAdvancedCache().getComponentRegistry().rewire();
      hrServer = TestHelper.startHotRodServer(localCacheManager);

      ConfigurationBuilder builder = TestCacheManagerFactory
            .getDefaultCacheConfiguration(false);
      RemoteStoreConfigurationBuilder storeConfigurationBuilder = builder
            .persistence()
               .addStore(RemoteStoreConfigurationBuilder.class)
               .remoteCacheName(REMOTE_CACHE);
      storeConfigurationBuilder
               .addServer()
View Full Code Here

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

   public void testRemoteCacheStoreConfigurationAdaptor() {
      ConfigurationBuilder b = new ConfigurationBuilder();
      b.persistence().addStore(RemoteStoreConfigurationBuilder.class)
         .remoteCacheName("RemoteCache")
         .fetchPersistentState(true)
         .addServer()
            .host("one").port(12111)
         .addServer()
View Full Code Here

      assert store.connectionPool().minEvictableIdleTime() == 10000;
      assert store.fetchPersistentState();
      assert store.async().enabled();

      b = new ConfigurationBuilder();
      b.persistence().addStore(RemoteStoreConfigurationBuilder.class).read(store);
      Configuration configuration2 = b.build();
      RemoteStoreConfiguration store2 = (RemoteStoreConfiguration) configuration2.persistence().stores().get(0);
      assert store2.remoteCacheName().equals("RemoteCache");
      assert store2.servers().size() == 2;
      assert store2.connectionPool().maxActive() == 10;
View Full Code Here

            .createCacheManager(hotRodCacheConfiguration(serverBuilder));
      sourceServerCache = sourceContainer.getCache();
      sourceServer = TestHelper.startHotRodServer(sourceContainer);

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

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

   }

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder cb = TestCacheManagerFactory.getDefaultCacheConfiguration(false);
      cb.persistence()
            .addStore(JdbcStringBasedStoreConfigurationBuilder.class)
            .preload(true)
            .key2StringMapper(LuceneKey2StringMapper.class)
            .table()
               .idColumnName("ID_COLUMN")
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

   /**
    * @param async set to true means the cache store instance is placed under an DelegatingCacheWriter
    */
   private void test(boolean async) {
      ConfigurationBuilder dcc = TestCacheManagerFactory.getDefaultCacheConfiguration(true);
      DummyInMemoryStoreConfigurationBuilder builder = dcc.persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class);
      if (async) {
         builder.async().enable();
      }
      EmbeddedCacheManager cacheManager = TestCacheManagerFactory.createCacheManager(dcc);
      Cache<Object,Object> cache = cacheManager.getCache();
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.