Examples of commitAsync()


Examples of com.google.appengine.api.datastore.Transaction.commitAsync()

    return null;
  }

  public SienaFuture<Void> commitTransaction() {
    Transaction txn = ds.getCurrentTransaction();
    return new SienaFutureContainer<Void>(txn.commitAsync());
  }

  public SienaFuture<Void> rollbackTransaction() {
    Transaction txn = ds.getCurrentTransaction();
    return new SienaFutureContainer<Void>(txn.rollbackAsync());
View Full Code Here

Examples of com.google.appengine.api.datastore.Transaction.commitAsync()

        Transaction tx = waitOnFuture(service.beginTransaction(TransactionOptions.Builder.withDefaults()));
        Key key;
        try {
            Future<Key> fKey = service.put(tx, new Entity("AsyncTx"));
            key = waitOnFuture(fKey);
            waitOnFuture(tx.commitAsync());
        } catch (Exception e) {
            waitOnFuture(tx.rollbackAsync());
            throw e;
        }
View Full Code Here

Examples of com.google.appengine.api.datastore.Transaction.commitAsync()

            T result = action.run(ads);
            ok = true;
            return result;
        } finally {
            if (ok)
                tx.commitAsync();
            else
                tx.rollbackAsync();

            sync(); // wait for tx to finish
        }
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.