Package org.infinispan.test

Examples of org.infinispan.test.ReplListener.expect()


      assert !cache1.containsKey(key);
      assert !cache2.containsKey(key);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      cache1.putForExternalRead(key, value);
      replListener2.waitForRpc();

      assertEquals("PFER updated cache1", value, cache1.get(key));
      assertEquals("PFER propagated to cache2 as expected", value, cache2.get(key));
View Full Code Here


      Cache<String, String> cache2 = cache(1, "replSync");
      TransactionManager tm1 = TestingUtil.getTransactionManager(cache1);
      TransactionManager tm2 = TestingUtil.getTransactionManager(cache2);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      tm1.begin();
      cache1.putForExternalRead(key, value);
      tm1.commit();
      replListener2.waitForRpc();
View Full Code Here

      assert !cache1.containsKey(key);
      assert !cache2.containsKey(key);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      cache1.putForExternalRead(key, value);
      replListener2.waitForRpc();

      assertEquals("PFER updated cache1", value, cache1.get(key));
      assertEquals("PFER propagated to cache2 as expected", value, cache2.get(key));
View Full Code Here

      Cache cache2 = cache(1, "replSync");
      TransactionManager tm1 = TestingUtil.getTransactionManager(cache1);
      TransactionManager tm2 = TestingUtil.getTransactionManager(cache2);
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      tm1.begin();
      cache1.putForExternalRead(key, value);
      tm1.commit();
      replListener2.waitForRpc();
View Full Code Here

      ReplListener replList0 = getReplListener(0);
      ReplListener replList1 = getReplListener(1);

      replList0.expect(PutKeyValueCommand.class);
      replList1.expect(PutKeyValueCommand.class);

      final String v1 = v(m);
      remoteCache0.put(1, v1);

      replList0.waitForRpc();
View Full Code Here

      // Check that all nodes (except the one we put to) are notified
      // but only if the transport is multicast-capable
      if (owner.getAdvancedCache().getRpcManager().getTransport().isMulticastCapable()) {
         for (Cache<Object, String> c : getNonOwners(KEY1)) {
            ReplListener rl = new ReplListener(c);
            rl.expect(InvalidateL1Command.class);
            listeners.add(rl);
            log.debugf("Added nonowner %s", c);
         }
      } else {
         ReplListener rl = new ReplListener(nonOwner);
View Full Code Here

            listeners.add(rl);
            log.debugf("Added nonowner %s", c);
         }
      } else {
         ReplListener rl = new ReplListener(nonOwner);
         rl.expect(InvalidateL1Command.class);
         listeners.add(rl);
      }
     
      // Put an object into an owner, this will cause the L1 records for this key to be invalidated
      owner.put(KEY1, "bar");
View Full Code Here

      assertEquals(secondNonOwner.get(KEY1), "foo");
      assertEquals(secondNonOwner.getAdvancedCache().getDataContainer().get(KEY1).getValue(), "foo");
     
      // Check that the non owners are notified
    ReplListener rl = new ReplListener(nonOwner);
      rl.expect(InvalidateL1Command.class);
      listeners.add(rl);
      rl = new ReplListener(secondNonOwner);
      rl.expect(InvalidateL1Command.class);
      listeners.add(rl);
     
View Full Code Here

      // Check that the non owners are notified
    ReplListener rl = new ReplListener(nonOwner);
      rl.expect(InvalidateL1Command.class);
      listeners.add(rl);
      rl = new ReplListener(secondNonOwner);
      rl.expect(InvalidateL1Command.class);
      listeners.add(rl);
     
      // Put an object into an owner, this will cause the L1 records for this key to be invalidated
      owner.put(KEY1, "bar");
     
View Full Code Here

      assertFalse(cache1.containsKey(key));
      assertFalse(cache2.containsKey(key));
      ReplListener replListener2 = replListener(cache2);

      replListener2.expect(PutKeyValueCommand.class);
      cache1.putForExternalRead(key, value);
      replListener2.waitForRpc();

      // wait for command the finish executing asynchronously
      eventually(new Condition() {
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.