Examples of BuddyReplicationConfig


Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   public void testDisabledConfig() throws Exception
   {
      String xmlConfig = "<buddy enabled=\"false\"/>";
      BuddyReplicationConfig config = getBuddyReplicationConfig(xmlConfig);
      cache = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(false);
      cache.getConfiguration().setBuddyReplicationConfig(config);
      assertNull(cache.getBuddyManager());
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   public void testBasicConfig() throws Exception
   {
      String xmlConfig = "<buddy enabled=\"true\"/>";
      BuddyReplicationConfig config = getBuddyReplicationConfig(xmlConfig);
      Configuration c = new Configuration();
      c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      c.setBuddyReplicationConfig(config);
      cache = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(c, false);
      cache.create();
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   private BuddyReplicationConfig getBuddyReplicationConfig(String xmlConfig)
         throws Exception
   {
      Element element = XmlConfigHelper.stringToElementInCoreNS(xmlConfig);
      BuddyElementParser elementParser = new BuddyElementParser();
      BuddyReplicationConfig config = elementParser.parseBuddyElement(element);
      return config;
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   public void testLocalModeConfig() throws Exception
   {
      String xmlConfig = "<buddy enabled=\"true\"/>";
      BuddyReplicationConfig config = getBuddyReplicationConfig(xmlConfig);
      cache = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(false);
      cache.getConfiguration().setBuddyReplicationConfig(config);
      cache.create();
      cache.start();
      assert cache.getBuddyManager() == null;
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

      assert first.getProperties().get("cache.jdbc.table.drop").equals("true");
   }

   public void testBuddyReplicationConfig()
   {
      BuddyReplicationConfig brConfig = syncConfig.getBuddyReplicationConfig();
      assert brConfig.isEnabled();
      BuddyReplicationConfig.BuddyLocatorConfig locatorConfig = brConfig.getBuddyLocatorConfig();
      assert "org.jboss.cache.buddyreplication.NextMemberBuddyLocator".equals(locatorConfig.getBuddyLocatorClass());
      assert locatorConfig.getBuddyLocatorProperties().get("numBuddies").equals("1");
      assert locatorConfig.getBuddyLocatorProperties().get("ignoreColocatedBuddies").equals("true");
      assert brConfig.getBuddyPoolName().equals("myBuddyPoolReplicationGroup");
      assert brConfig.getBuddyCommunicationTimeout() == 2000;
      assert brConfig.isAutoDataGravitation();
      assert brConfig.isDataGravitationRemoveOnFind();
      assert brConfig.isDataGravitationSearchBackupTrees();
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }


   private BuddyReplicationConfig getBuddyConfig() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      brc.setBuddyPoolName("TEST");
      return brc;
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   @Test(enabled = false)
   public void testReplSyncBR() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);
      testReplSync();
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   @Test(enabled = false)
   public void testReplAsyncBR() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);
      cache.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
      cache.getConfiguration().setConcurrencyLevel(500);
      cache.getConfiguration().setIsolationLevel(IsolationLevel.READ_COMMITTED);
//      cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);     
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   @Test(enabled = false)
   public void testReplSyncOptBR() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);
      testReplSyncOptimistic();
   }
View Full Code Here

Examples of org.jboss.cache.config.BuddyReplicationConfig

   }

   @Test(enabled = false)
   public void testReplAsyncOptBR() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);
      testReplAsyncOptimistic();
   }
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.