ApiFuture < Void > rollback ( ) { pending = false ; RollbackRequest . Builder reqBuilder = RollbackRequest . newBuilder ( ) ; reqBuilder . setTransaction ( transactionId ) ; reqBuilder . setDatabase ( firestore . getDatabaseName ( ) ) ; ApiFuture < Empty > rollbackFuture = firestore . sendRequest ( reqBuilder . build ( ) , firestore . getClient ( ) . rollbackCallable ( ) ) ; return ApiFutures . transform ( rollbackFuture , new ApiFunction < Empty , Void > ( ) { @ Override public Void apply ( Empty beginTransactionResponse ) { return null ; } } ) ; }
Rolls a transaction back and releases all read locks .