Interface Datastore.TransactionCallable<T>

Type Parameters:
T - the type of the return value
Enclosing interface:
Datastore

public static interface Datastore.TransactionCallable<T>
A callback for running with a transactional 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.
  • Method Summary

    Modifier and Type
    Method
    Description
    run(DatastoreReaderWriter readerWriter)
    Callback's invoke method for the TransactionCallable.
  • Method Details

    • run

      T run(DatastoreReaderWriter readerWriter) throws Exception
      Callback's invoke method for the TransactionCallable.
      Parameters:
      readerWriter - DatastoreReaderWriter associated with the new transaction
      Returns:
      T The transaction result
      Throws:
      Exception - upon failure