Uses of Interface
com.google.appengine.api.datastore.Transaction
Packages that use Transaction
Package
Description
Provides a mechanism to perform work initiated by a user request, outside of that request.
-
Uses of Transaction in com.google.appengine.api.datastore
Methods in com.google.appengine.api.datastore that return TransactionModifier and TypeMethodDescriptionDatastoreService.beginTransaction()
Equivalent tobeginTransaction(TransactionOptions.Builder.withDefaults())
.DatastoreService.beginTransaction
(TransactionOptions options) Begins a transaction against the datastore.AdminDatastoreService.getCurrentTransaction()
AdminDatastoreService.getCurrentTransaction
(Transaction returnedIfNoTxn) BaseDatastoreService.getCurrentTransaction()
Returns the current transaction for this thread, or throws an exception if there is no current transaction.BaseDatastoreService.getCurrentTransaction
(Transaction returnedIfNoTxn) Returns the current transaction for this thread, or returns the parameter if there is no current transaction.CallbackContext.getCurrentTransaction()
Returns the current transaction, ornull
if there is no current transaction.@Nullable Transaction
TransactionOptions.previousTransaction()
Return the previous transaction that is being retried, ornull
if none was provided.Methods in com.google.appengine.api.datastore that return types with arguments of type TransactionModifier and TypeMethodDescriptionAdminDatastoreService.beginTransaction()
AdminDatastoreService.beginTransaction
(TransactionOptions options) AsyncDatastoreService.beginTransaction()
AsyncDatastoreService.beginTransaction
(TransactionOptions options) AdminDatastoreService.getActiveTransactions()
BaseDatastoreService.getActiveTransactions()
Returns allTransaction
s started by this thread upon which no attempt to commit or rollback has been made.Methods in com.google.appengine.api.datastore with parameters of type TransactionModifier and TypeMethodDescriptionAdminDatastoreService.delete
(@Nullable Transaction txn, Key... keys) AdminDatastoreService.delete
(@Nullable Transaction txn, Iterable<Key> keys) AsyncDatastoreService.delete
(@Nullable Transaction txn, Key... keys) AsyncDatastoreService.delete
(@Nullable Transaction txn, Iterable<Key> keys) void
DatastoreService.delete
(Transaction txn, Key... keys) Exhibits the same behavior asDatastoreService.delete(Key...)
, but executes within the provided transaction.void
DatastoreService.delete
(Transaction txn, Iterable<Key> keys) Exhibits the same behavior asDatastoreService.delete(Iterable)
, but executes within the provided transaction.AdminDatastoreService.get
(@Nullable Transaction txn, Key key) AdminDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) AsyncDatastoreService.get
(@Nullable Transaction txn, Key key) AsyncDatastoreService.get
(@Nullable Transaction txn, Iterable<Key> keys) DatastoreService.get
(Transaction txn, Key key) Exhibits the same behavior asDatastoreService.get(Key)
, but executes within the provided transaction.DatastoreService.get
(Transaction txn, Iterable<Key> keys) Exhibits the same behavior asDatastoreService.get(Iterable)
, but executes within the provided transaction.AdminDatastoreService.getCurrentTransaction
(Transaction returnedIfNoTxn) BaseDatastoreService.getCurrentTransaction
(Transaction returnedIfNoTxn) Returns the current transaction for this thread, or returns the parameter if there is no current transaction.AdminDatastoreService.prepare
(Transaction txn, Query query) BaseDatastoreService.prepare
(Transaction txn, Query query) Exhibits the same behavior asBaseDatastoreService.prepare(Query)
, but executes within the provided transaction.AdminDatastoreService.put
(@Nullable Transaction txn, Entity entity) AdminDatastoreService.put
(@Nullable Transaction txn, Iterable<Entity> entities) AsyncDatastoreService.put
(@Nullable Transaction txn, Entity entity) AsyncDatastoreService.put
(@Nullable Transaction txn, Iterable<Entity> entities) DatastoreService.put
(Transaction txn, Entity entity) Exhibits the same behavior asDatastoreService.put(Entity)
, but executes within the provided transaction.DatastoreService.put
(Transaction txn, Iterable<Entity> entities) Exhibits the same behavior asDatastoreService.put(Iterable)
, but executes within the provided transaction.TransactionOptions.setPreviousTransaction
(Transaction previousTransaction) Set which previous transaction to retry.static void
TransactionHelper.setTransaction
(Transaction txn, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueAddRequest.Builder request) Sets either the transaction or datastore_transaction field in a TaskQueueAddRequest depending on what kind of transaction is provided.static TransactionOptions
TransactionOptions.Builder.withPreviousTransaction
(Transaction previousTransaction) Shorthand forTransactionOptions.withTransactionMode(Mode.READ_WRITE).setPreviousTransaction(...);
-
Uses of Transaction in com.google.appengine.api.taskqueue
Methods in com.google.appengine.api.taskqueue with parameters of type TransactionModifier and TypeMethodDescriptionQueue.add
(Transaction txn, TaskOptions taskOptions) Submits a task to this queue in the provided Transaction.Queue.add
(Transaction txn, Iterable<TaskOptions> taskOptions) Submits tasks to this queue in the provided Transaction.Queue.addAsync
(Transaction txn, TaskOptions taskOptions) Asynchronously submits a task to this queue in the provided Transaction.Queue.addAsync
(Transaction txn, Iterable<TaskOptions> taskOptions) Asynchronously submits tasks to this queue in the provided Transaction.