Package org.jboss.cache.config

Examples of org.jboss.cache.config.BuddyReplicationConfig


      waitForTest();
   }

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


      testReplSync();
   }

   @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

      testReplAsync();
   }

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

      testReplSyncOptimistic();
   }

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

   private Cache<String, Integer> cache2;

   @BeforeMethod
   public void setUp() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      brc.setBuddyCommunicationTimeout(1000);
      brc.setAutoDataGravitation(true);
      brc.setDataGravitationRemoveOnFind(true);
      brc.setDataGravitationSearchBackupTrees(true);
      Configuration c = new Configuration();
      c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      c.setBuddyReplicationConfig(brc);

      // Cache1 will be used only for recovery.
View Full Code Here

      assertInterceptorLinkage(list);
   }

   public void testBuddyReplicationOptLocking() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);

      cache.getConfiguration().setCacheMode(REPL_SYNC);
      cache.getConfiguration().setNodeLockingScheme(OPTIMISTIC);
      cache.create();// initialise various subsystems such as BRManager
View Full Code Here

      assertInterceptorLinkage(list);
   }

   public void testBuddyReplicationPessLocking() throws Exception
   {
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      cache.getConfiguration().setBuddyReplicationConfig(brc);
      cache.getConfiguration().setCacheMode(REPL_SYNC);
      cache.create();// initialise various subsystems such as BRManager
      InterceptorChain chain = getInterceptorChainFactory(cache).buildInterceptorChain();
      List<CommandInterceptor> list = chain.asList();
View Full Code Here

      CacheSPI<Object, Object> c = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(UnitTestConfigurationFactory.createConfiguration(CacheMode.REPL_SYNC, false, false, true), false, getClass());

      String threadId = Thread.currentThread().getName();
      //c.getConfiguration().setClusterName("BuddyReplicationTest-" + threadId);

      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      if (buddyPoolName != null) brc.setBuddyPoolName(buddyPoolName);
      brc.setEnabled(true);
      brc.setDataGravitationRemoveOnFind(removeOnFind);
      brc.setDataGravitationSearchBackupTrees(true);
      brc.setAutoDataGravitation(useDataGravitation);
      NextMemberBuddyLocatorConfig nextMemberBuddyLocatorConfig = new NextMemberBuddyLocatorConfig();
      nextMemberBuddyLocatorConfig.setNumBuddies(numBuddies);
      brc.setBuddyLocatorConfig(nextMemberBuddyLocatorConfig);
      c.getConfiguration().setBuddyReplicationConfig(brc);

      c.getConfiguration().setFetchInMemoryState(true);
      c.getConfiguration().setNodeLockingScheme(optimisticLocks ? NodeLockingScheme.OPTIMISTIC : getNonOptimisticLockingScheme());
View Full Code Here

      runCompleteTest();
   }

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

      testReplSync();
   }

   @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

TOP

Related Classes of org.jboss.cache.config.BuddyReplicationConfig

Copyright © 2018 www.massapicom. 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.