TransactionOptions

public final classTransactionOptions


Options to customize transaction behavior forrunTransaction.

Summary

Nested types

public final classTransactionOptions.Builder

A Builder for creatingTransactionOptions.

Public fields

final int

Public methods

boolean
int

Get maximum number of attempts to commit, after which transaction fails.

int
String

Public fields

maxAttempts

public final int maxAttempts

Public methods

equals

public boolean equals(Object o)

getMaxAttempts

public int getMaxAttempts()

Get maximum number of attempts to commit, after which transaction fails. Default is 5.

Returns
int

The maximum number of attempts

hashCode

public int hashCode()

toString

public String toString()

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

Last updated 2025-07-21 UTC.