Examples of expectWithTx()


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

            return (tt1.getRemoteTxCount() == 0) && (tt1.getLocalTxCount() == 0) &&  (tt2.getRemoteTxCount() == 0)
                  && (tt2.getLocalTxCount() == 0);
         }
      });

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

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      String contextHostName = mgr0.getContextHostName();

      // Create the session
      SetAttributesServlet sas = new SetAttributesServlet(Collections.singletonMap(KEY, getAttributeValue(attr++)));
      ReplicationListener replListener0 = replListeners[0];
      replListener0.expectWithTx(PutDataMapCommand.class);
     
      Request req = new Request(mgr3, null, sas);
      req.execute();     
      replListener0.waitForReplicationToOccur();     
     
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      // validate cache contents
      BuddyReplicationAssertions.assertBuddyBackup(contextHostName, sessionId, mgr3.getCache(), mgr0.getCache());
     
      // Modify the session
      sas = new SetAttributesServlet(Collections.singletonMap(KEY, getAttributeValue(attr++)));
      replListener0.expectWithTx(PutDataMapCommand.class);
     
      req = new Request(mgr3, sessionId, sas);
      req.execute();     
      replListener0.waitForReplicationToOccur();     
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      mgr2.passivate(sessionId);
      mgr3.passivate(sessionId);  
     
      // Reactivate the session
      sas = new SetAttributesServlet(Collections.singletonMap(KEY, getAttributeValue(attr++)));
      replListener0.expectWithTx(PutDataMapCommand.class);
     
      req = new Request(mgr3, sessionId, sas);
      req.execute();
      replListener0.waitForReplicationToOccur();     
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      // Invalidate the session
      sas = new SetAttributesServlet(Collections.singletonMap(KEY, getAttributeValue(attr++)));
      InvalidationServlet invs = new InvalidationServlet();
      MultipleActionServlet mas = new MultipleActionServlet(sas, invs);
      ReplicationListener replListener1 = replListeners[1];
      replListener1.expectWithTx(PutDataMapCommand.class, RemoveNodeCommand.class);
      replListener1.expect(DataGravitationCleanupCommand.class);

      req = new Request(mgr0, sessionId, mas);
      req.execute();     
      replListener1.waitForReplicationToOccur();
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      assertEquals("value", cache1.get(fqn, key));
      assertNull(cache2.get(fqn, key));
      assertNull(loader1.get(fqn));
      assertNull(loader2.get(fqn));

      replListener.expectWithTx(PutKeyValueCommand.class);
      mgr1.commit();
      replListener.waitForReplicationToOccur();

      assertEquals("value", cache1.get(fqn, key));
      assertEquals("value", cache2.get(fqn, key));
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      createCaches(false, true);

      ReplicationListener replListener = ReplicationListener.getReplicationListener(cache2);

      mgr1.begin();
      replListener.expectWithTx(PutKeyValueCommand.class);
      cache1.put(fqn, key, "value");

      assertEquals("value", cache1.get(fqn, key));
      assertNull(cache2.get(fqn, key));
      assertNull(loader1.get(fqn));
View Full Code Here

Examples of org.jboss.cache.util.internals.replicationlisteners.ReplicationListener.expectWithTx()

      assertEquals("value", cache3.get("/test", "key"));

      mgr3.setNotification(new TestNotification(abortBeforeCompletion));

      cacheLister2.expectWithTx(PutKeyValueCommand.class);
      cacheLister3.expectWithTx(PutKeyValueCommand.class);
      mgr1.begin();
      cache1.put("/test", "key", "value2");
      mgr1.commit();
      cacheLister2.waitForReplicationToOccur();
      cacheLister3.waitForReplicationToOccur();
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.