Package org.infinispan

Examples of org.infinispan.Cache.startBatch()


   public void testBatchWithoutOngoingTMSuspension() throws Exception {
      Cache cache = createCache("testBatchWithoutOngoingTMSuspension");
      TransactionManager tm = TestingUtil.getTransactionManager(cache);
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.startBatch();
      cache.put("k", "v");
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
View Full Code Here


      assert "v2".equals(getOnDifferentThread(cache, "k2"));
   }

   public void testBatchRollback() throws Exception {
      Cache cache = createCache("testBatchRollback");
      cache.startBatch();
      cache.put("k", "v");
      cache.put("k2", "v2");

      assertEquals(getOnDifferentThread(cache, "k"), null);
      assert getOnDifferentThread(cache, "k2") == null;
View Full Code Here

   public void testBatchWithoutOngoingTMSuspension() throws Exception {
      Cache cache = createCache("testBatchWithoutOngoingTMSuspension");
      TransactionManager tm = TestingUtil.getTransactionManager(cache);
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.startBatch();
      cache.put("k", "v");
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
View Full Code Here

      assert "v2".equals(getOnDifferentThread(cache, "k2"));
   }

   public void testBatchRollback() throws Exception {
      Cache cache = createCache("testBatchRollback");
      cache.startBatch();
      cache.put("k", "v");
      cache.put("k2", "v2");

      assertEquals(getOnDifferentThread(cache, "k"), null);
      assert getOnDifferentThread(cache, "k2") == null;
View Full Code Here

   public void testBatchWithoutOngoingTMSuspension() throws Exception {
      Cache cache = createCache("testBatchWithoutOngoingTMSuspension");
      TransactionManager tm = TestingUtil.getTransactionManager(cache);
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.startBatch();
      cache.put("k", "v");
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
View Full Code Here

      assert "v2".equals(getOnDifferentThread(cache, "k2"));
   }

   public void testBatchRollback() throws Exception {
      Cache cache = createCache("testBatchRollback");
      cache.startBatch();
      cache.put("k", "v");
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
      assert getOnDifferentThread(cache, "k2") == null;
View Full Code Here

   public void testBatchWithoutOngoingTMSuspension() throws Exception {
      Cache cache = createCache("testBatchWithoutOngoingTMSuspension");
      TransactionManager tm = TestingUtil.getTransactionManager(cache);
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.startBatch();
      cache.put("k", "v");
      assert tm.getTransaction() == null : "Should have no ongoing txs";
      cache.put("k2", "v2");

      assert getOnDifferentThread(cache, "k") == null;
View Full Code Here

      assert "v2".equals(getOnDifferentThread(cache, "k2"));
   }

   public void testBatchRollback() throws Exception {
      Cache cache = createCache("testBatchRollback");
      cache.startBatch();
      cache.put("k", "v");
      cache.put("k2", "v2");

      assertEquals(getOnDifferentThread(cache, "k"), null);
      assert getOnDifferentThread(cache, "k2") == null;
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.