private < T > void runTransaction ( final Transaction . Function < T > transactionCallback , final SettableApiFuture < T > resultFuture , final TransactionOptions options ) { // span is intentionally not ended here. It will be ended by runTransactionAttempt on success // or error. Span span = tracer . spanBuilder ( "CloudFirestore.Transaction" ) . startSpan ( ) ; try ( Scope s = tracer . withSpan ( span ) ) { runTransactionAttempt ( transactionCallback , resultFuture , options , span ) ; } }
Transaction functions that returns its result in the provided SettableFuture .