Package org.jboss.cache.util.internals

Examples of org.jboss.cache.util.internals.ReplicationQueueNotifier


      for (Thread t : threads) t.join();

      // now test results
      verify(mockRpcManager);

      ReplicationQueueNotifier notifier = new ReplicationQueueNotifier(cache);
      notifier.waitUntillAllReplicated(250);

      assert replQ.elements.size() == 0;
   }
View Full Code Here


   private void waitTillAllReplicationsFinish(int count, CacheSPI[] caches)
         throws Exception
   {
      for (int i = 0; i < count; i++)
      {
         new ReplicationQueueNotifier(caches[i]).waitUntillAllReplicated(5000);
      }
   }
View Full Code Here

      for (Thread t : threads) t.join();

      // now test results
      verify(mockRpcManager);

      ReplicationQueueNotifier notifier = new ReplicationQueueNotifier(cache);
      notifier.waitUntillAllReplicated(250);
//      TestingUtil.sleepThread(250); // make sure the queue flushes

      assert replQ.elements.size() == 0;
   }
View Full Code Here

      {
         System.out.println("on put i = " + i);
         cache.put("/a/b/c" + i, "key", "value");
         assertNotNull(cache.get("/a/b/c" + i, "key"));
      }
      ReplicationQueueNotifier notifier = new ReplicationQueueNotifier(cache);
      notifier.waitUntillAllReplicated(500);
//      TestingUtil.sleepThread(500);
      for (int i = 0; i < COUNT; i++) assertNotNull("on get i = " + i, cache2.get("/a/b/c" + i, "key"));
   }
View Full Code Here

   public void testTransactionalReplication() throws Exception
   {
      // outside of tx scope
      cache.put("/a", "k", "v");

      ReplicationQueueNotifier replicationQueueNotifier = new ReplicationQueueNotifier(cache);
      replicationQueueNotifier.waitUntillAllReplicated(200);

      assert cache2.get("/a", "k").equals("v");

      // now, a transactional call
      txManager.begin();
      cache2.put("/a", "k", "v2");
      txManager.commit();

      ReplicationQueueNotifier replicationQueueNotifier2 = new ReplicationQueueNotifier(cache2);
      replicationQueueNotifier2.waitUntillAllReplicated(200);


      assert cache.get("/a", "k").equals("v2");
   }
View Full Code Here

   private void waitTillAllReplicationsFinish(int count, CacheSPI[] caches)
         throws Exception
   {
      for (int i = 0; i < count; i++)
      {
         new ReplicationQueueNotifier(caches[i]).waitUntillAllReplicated(5000);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.util.internals.ReplicationQueueNotifier

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.