Examples of sites()


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

      startCache("LON", "nycBackup", nycBackup);
      startCache("NYC", "lonBackup", lonBackup);

      Configuration lonBackupConfig = cache("NYC", "lonBackup", 0).getCacheConfiguration();
      assertTrue(lonBackupConfig.sites().backupFor().isBackupFor("LON", CacheContainer.DEFAULT_CACHE_NAME));
   }

   protected Cache<Object, Object> backup(String site) {
      if (site.equals("LON")) return cache("NYC", "lonBackup", 0);
      if (site.equals("NYC")) return cache("LON", "nycBackup", 0);
View Full Code Here

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

      testDefault(dcc);
   }

   public void testBackupNyc() {
      Configuration dcc = cacheManager.getCacheConfiguration("backupNyc");
      assertEquals(dcc.sites().allBackups().size(), 0);
      BackupForConfiguration backupForConfiguration = dcc.sites().backupFor();
      assertEquals("someCache", backupForConfiguration.remoteCache());
      assertEquals("NYC", backupForConfiguration.remoteSite());
   }
View Full Code Here

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

   }

   public void testBackupNyc() {
      Configuration dcc = cacheManager.getCacheConfiguration("backupNyc");
      assertEquals(dcc.sites().allBackups().size(), 0);
      BackupForConfiguration backupForConfiguration = dcc.sites().backupFor();
      assertEquals("someCache", backupForConfiguration.remoteCache());
      assertEquals("NYC", backupForConfiguration.remoteSite());
   }

   public void testInheritor() {
View Full Code Here

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

      testDefault(dcc);
   }

   public void testNoBackups() {
      Configuration dcc = cacheManager.getCacheConfiguration("noBackups");
      assertEquals(dcc.sites().allBackups().size(), 0);
      assertEquals(dcc.sites().backupFor().remoteCache(), null);
      assertEquals(dcc.sites().backupFor().remoteSite(), null);
   }

   public void testCustomBackupPolicy() {
View Full Code Here

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

   }

   public void testNoBackups() {
      Configuration dcc = cacheManager.getCacheConfiguration("noBackups");
      assertEquals(dcc.sites().allBackups().size(), 0);
      assertEquals(dcc.sites().backupFor().remoteCache(), null);
      assertEquals(dcc.sites().backupFor().remoteSite(), null);
   }

   public void testCustomBackupPolicy() {
      Configuration dcc = cacheManager.getCacheConfiguration("customBackupPolicy");
View Full Code Here

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

   public void testNoBackups() {
      Configuration dcc = cacheManager.getCacheConfiguration("noBackups");
      assertEquals(dcc.sites().allBackups().size(), 0);
      assertEquals(dcc.sites().backupFor().remoteCache(), null);
      assertEquals(dcc.sites().backupFor().remoteSite(), null);
   }

   public void testCustomBackupPolicy() {
      Configuration dcc = cacheManager.getCacheConfiguration("customBackupPolicy");
      assertEquals(dcc.sites().allBackups().size(), 1);
View Full Code Here

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

      assertEquals(dcc.sites().backupFor().remoteSite(), null);
   }

   public void testCustomBackupPolicy() {
      Configuration dcc = cacheManager.getCacheConfiguration("customBackupPolicy");
      assertEquals(dcc.sites().allBackups().size(), 1);

      assertTrue(dcc.sites().allBackups().contains(new BackupConfiguration("NYC2", BackupConfiguration.BackupStrategy.SYNC,
                                                                           160000, BackupFailurePolicy.CUSTOM,
                                                                           CountingCustomFailurePolicy.class.getName(),
                                                                           false, DEFAULT_TAKE_OFFLINE ,
View Full Code Here

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

   public void testCustomBackupPolicy() {
      Configuration dcc = cacheManager.getCacheConfiguration("customBackupPolicy");
      assertEquals(dcc.sites().allBackups().size(), 1);

      assertTrue(dcc.sites().allBackups().contains(new BackupConfiguration("NYC2", BackupConfiguration.BackupStrategy.SYNC,
                                                                           160000, BackupFailurePolicy.CUSTOM,
                                                                           CountingCustomFailurePolicy.class.getName(),
                                                                           false, DEFAULT_TAKE_OFFLINE ,
                                                                           DEFAULT_STATE_TRANSFER, true)));
      assertEquals(dcc.sites().backupFor().remoteCache(), null);
View Full Code Here

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

      assertTrue(dcc.sites().allBackups().contains(new BackupConfiguration("NYC2", BackupConfiguration.BackupStrategy.SYNC,
                                                                           160000, BackupFailurePolicy.CUSTOM,
                                                                           CountingCustomFailurePolicy.class.getName(),
                                                                           false, DEFAULT_TAKE_OFFLINE ,
                                                                           DEFAULT_STATE_TRANSFER, true)));
      assertEquals(dcc.sites().backupFor().remoteCache(), null);
   }

   private void testDefault(Configuration dcc) {
      assertEquals(dcc.sites().allBackups().size(), 2);
      assertTrue(dcc.sites().allBackups().contains(new BackupConfiguration("NYC", BackupConfiguration.BackupStrategy.SYNC,
View Full Code Here

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

         startCache("LON", "nycBackup", nycBackup);
         ConfigurationBuilder lonBackup = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, isLonBackupTransactional);
         lonBackup.sites().backupFor().remoteSite("LON").defaultRemoteCache();
         startCache("NYC", "lonBackup", lonBackup);
         Configuration lonBackupConfig = cache("NYC", "lonBackup", 0).getCacheConfiguration();
         assertTrue(lonBackupConfig.sites().backupFor().isBackupFor("LON", CacheContainer.DEFAULT_CACHE_NAME));
      }
   }

   protected Cache<Object, Object> backup(String site) {
      if (site.equals("LON")) return implicitBackupCache ? cache("NYC", 0) : cache("NYC", "lonBackup", 0);
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.