Package org.infinispan.util

Examples of org.infinispan.util.CountingRpcManager.resetStats()


      final CountingRpcManager rpcManager = replaceRpcManager(cache);

      cache(0).put(key, "v0");

      tm.begin();
      rpcManager.resetStats();
      cache.getAdvancedCache().withFlags(Flag.IGNORE_RETURN_VALUES).put(key, "v1");
      AssertJUnit.assertEquals("Wrong number of gets after put.", 0, rpcManager.clusterGet);

      AssertJUnit.assertEquals("Wrong value read.", "v1", cache.get(key));
      AssertJUnit.assertEquals("Wrong number of gets after read.", 0, rpcManager.clusterGet);
View Full Code Here


      if (initialized) {
         cache(0).put(key, "v1");
      }

      tm.begin();
      rpcManager.resetStats();
      AssertJUnit.assertEquals("Wrong value read.", initialized ? "v1" : null, cache.get(key));
      AssertJUnit.assertEquals("Wrong number of gets after read.", 1, rpcManager.clusterGet);

      AssertJUnit.assertEquals("Wrong put return value.", initialized ? "v1" : null, cache.put(key, "v2"));
      AssertJUnit.assertEquals("Wrong number of gets after put.", 1, rpcManager.clusterGet);
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.