Examples of startShort()


Examples of co.cask.tephra.TransactionManager.startShort()

      // start a tx1, add a change A and commit
      Transaction tx1 = txManager.startShort();
      Assert.assertTrue(txManager.canCommit(tx1, Collections.singleton(a)));
      Assert.assertTrue(txManager.commit(tx1));
      // start a tx2 and add a change B
      Transaction tx2 = txManager.startShort();
      Assert.assertTrue(txManager.canCommit(tx2, Collections.singleton(b)));
      // start a tx3
      Transaction tx3 = txManager.startShort();
      TransactionSnapshot origState = txManager.getCurrentState();
      LOG.info("Orig state: " + origState);
View Full Code Here

Examples of co.cask.tephra.TransactionManager.startShort()

      Assert.assertTrue(txManager.commit(tx1));
      // start a tx2 and add a change B
      Transaction tx2 = txManager.startShort();
      Assert.assertTrue(txManager.canCommit(tx2, Collections.singleton(b)));
      // start a tx3
      Transaction tx3 = txManager.startShort();
      TransactionSnapshot origState = txManager.getCurrentState();
      LOG.info("Orig state: " + origState);

      // simulate a failure by starting a new tx manager without stopping first
      storage2 = getStorage(conf);
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.