Package com.google.walkaround.util.server.appengine.CheckedDatastore

Examples of com.google.walkaround.util.server.appengine.CheckedDatastore.CheckedTransaction.commit()


        new RetryHelper().run(new RetryHelper.VoidBody() {
          @Override public void run() throws RetryableFailure, PermanentFailure {
            CheckedTransaction tx = datastore.get().beginTransaction();
            try {
              if (perUserTable.get().deleteAllTasks(tx, userId)) {
                tx.commit();
              }
            } finally {
              tx.close();
            }
          }
View Full Code Here


        new RetryHelper().run(new RetryHelper.VoidBody() {
          @Override public void run() throws RetryableFailure, PermanentFailure {
            CheckedTransaction tx = datastore.get().beginTransaction();
            try {
              if (perUserTable.get().deleteAllWaves(tx, userId)) {
                tx.commit();
              }
            } finally {
              tx.close();
            }
          }
View Full Code Here

          CheckedTransaction tx = datastore.get().beginTransaction();
          try {
            for (ImportTaskPayload payload : payloads) {
              perUserTable.get().addTask(tx, userId, payload);
            }
            tx.commit();
          } finally {
            tx.close();
          }
        }
      });
View Full Code Here

        @Override public void run() throws RetryableFailure, PermanentFailure {
          CheckedTransaction tx = datastore.beginTransaction();
          log.info("About to put " + entity);
          tx.put(entity);
          memcache.enqueuePutNull(tx, userId);
          tx.commit();
          log.info("Committed " + tx);
        }
      });
    memcache.delete(userId);
  }
View Full Code Here

        @Override public void run() throws RetryableFailure, PermanentFailure {
          CheckedTransaction tx = datastore.beginTransaction();
          log.info("About to delete " + key);
          tx.delete(key);
          memcache.enqueuePutNull(tx, userId);
          tx.commit();
          log.info("Committed " + tx);
        }
      });
    memcache.delete(userId);
  }
View Full Code Here

            new ChangeData<String>(clientId, "delta 1 " + massiveString),
            new ChangeData<String>(clientId, "delta 2 " + massiveString)));
    // This will generate another snapshot.
    appender.append(new ChangeData<String>(clientId, "delta 3 " + massiveString));
    appender.finish();
    tx.commit();
    assertEquals(ImmutableList.of("op", "op", "op", "op", "Data", "Data"), movedProperties);

    CheckedTransaction tx2 = datastore.beginTransaction();
    MutationLog mutationLog2 =
        // TODO: eliminate code duplication
View Full Code Here

                }
                perUserTable.deleteTask(tx, userId, taskId);
                for (ImportTaskPayload payload : followupTasks) {
                  perUserTable.addTask(tx, userId, payload);
                }
                tx.commit();
              } finally {
                tx.close();
              }
            }
          });
View Full Code Here

          new RetryHelper.VoidBody() {
            @Override public void run() throws RetryableFailure, PermanentFailure {
              CheckedTransaction tx = datastore.beginTransaction();
              try {
                if (perUserTable.addRemoteWavelets(tx, userId, partition)) {
                  tx.commit();
                }
              } finally {
                tx.close();
              }
            }
View Full Code Here

                  }
                  ImportTaskPayload payload = new ImportTaskPayloadGsonImpl();
                  payload.setFindWaveletsTask(task);
                  perUserTable.addTask(tx, userId, payload);
                }
                tx.commit();
              } finally {
                tx.close();
              }
            }
          });
View Full Code Here

                  task.setSettings(autoImportSettings);
                  ImportTaskPayload payload = new ImportTaskPayloadGsonImpl();
                  payload.setImportWaveletTask(task);
                  perUserTable.addTask(tx, userId, payload);
                }
                tx.commit();
              } finally {
                tx.close();
              }
            }
          });
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.