google.appengine.datastore.datastore_stub_util.BaseTransactionManager

A class that manages the state of transactions.

Inherits From: expected_type

This includes creating consistent snap shots for transactions.

Methods

BeginTransaction

View source

Start a transaction on the given app.

Args
app A string representing the app for which to start the transaction.
allow_multiple_eg True if transactions can span multiple entity groups.
previous_transaction The transaction to reset.
mode Mode of the transaction.

Returns
A datastore_pb.Transaction() for the created transaction

Clear

View source

Discards any pending transactions and resets the meta data.

Flush

View source

Applies all outstanding transactions.

GetTxn

View source

Gets the LiveTxn object associated with the given transaction.

Args
transaction The datastore_pb.Transaction() to look up.
request_trusted A boolean indicating If the requesting app is trusted.
request_app A string representing the app making the request.

Returns
The associated LiveTxn object.

Groom

View source

Attempts to apply any outstanding transactions.

The consistency policy determins if a transaction should be applied.

SetConsistencyPolicy

View source

Set the consistency to use.

Causes all data to be flushed.

Args
policy A obj inheriting from BaseConsistencyPolicy.