Interface Datastore.TransactionCallable<T> (2.29.1)

publicstaticinterface 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)

publicabstractTrun(DatastoreReaderWriterreaderWriter)

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.