Interface Datastore.TransactionCallable<T> (2.24.3)

public static interface Datastore.TransactionCallable<T>

A callback for running with a transactional com.google.cloud.datastore.DatastoreReaderWriter. The associated transaction will be committed after a successful return from the run method. Any propagated exception will cause the transaction to be rolled-back.

Type Parameter

Name Description
T

Methods

run(DatastoreReaderWriter readerWriter)

public abstract T run(DatastoreReaderWriter readerWriter)

Callback's invoke method for the TransactionCallable.

Parameter
Name Description
readerWriter DatastoreReaderWriter

DatastoreReaderWriter associated with the new transaction

Returns
Type Description
T

T The transaction result

Exceptions
Type Description
Exception

upon failure