code: public final CommitResponse commit(
        SessionName session, TransactionOptions singleUseTransaction, List<Mutation> mutations) {
  
      CommitRequest request =
          CommitRequest.newBuilder()
              .setSession(session == null ? null : session.toString())
              .setSingleUseTransaction(singleUseTransaction)
              .addAllMutations(mutations)
              .build();
      return commit(request);
    }
docs: Commits a transaction. The request includes the mutations to be applied to rows in the
  database.
  
  <p>`Commit` might return an `ABORTED` error. This can occur at any time; commonly, the cause is
  conflicts with concurrent transactions. However, it can also happen for a variety of other
  reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the
  beginning, re-using the same session.
  
  <p>Sample code:
  
  <pre><code>
  try (SpannerClient spannerClient = SpannerClient.create()) {
  SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
  TransactionOptions singleUseTransaction = TransactionOptions.newBuilder().build();
  List&lt;Mutation&gt; mutations = new ArrayList&lt;&gt;();
  CommitResponse response = spannerClient.commit(session, singleUseTransaction, mutations);
  }
  </code></pre>
  
  @param session Required. The session in which the transaction to be committed is running.
  @param singleUseTransaction Execute mutations in a temporary transaction. Note that unlike
  commit of a previously-started transaction, commit with a temporary transaction is
  non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once
  (for instance, due to retries in the application, or in the transport library), it is
  possible that the mutations are executed more than once. If this is undesirable, use
  [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
  [Commit][google.spanner.v1.Spanner.Commit] instead.
  @param mutations The mutations to be executed when this transaction commits. All mutations are
  applied atomically, in the order they appear in this list.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails