Class TransactionRerunPolicy (2.22.0)

The base class for the Spanner library transaction rerun policies.

The Client::Commit() functions (there are several overloads) consume a callable to create mutations or a list of mutations. Commit() creates a transaction and applies the mutations. If the transaction fails, an instance of this class is used to control whether the transaction will be attempted again.

Functions

clone() const

Creates a new instance of the policy, reset to the initial state.

Returns
TypeDescription
std::unique_ptr< TransactionRerunPolicy >

OnFailure(Status const &)

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

OnFailure(Status const &)

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

IsExhausted() const

Returns
TypeDescription
bool

IsExhausted() const

Returns
TypeDescription
bool

IsPermanentFailure(Status const &) const

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool

IsPermanentFailure(Status const &) const

Parameter
NameDescription
status Status const &
Returns
TypeDescription
bool