Firestore API - Class TransactionOptions (3.9.0)

public sealed class TransactionOptions

Reference documentation and code samples for the Firestore API class TransactionOptions.

Immutable class representing options for executing transactions.

Inheritance

object > TransactionOptions

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Properties

Default

public static TransactionOptions Default { get; }

The transaction options that are used if nothing is specified by the caller.

Property Value
Type Description
TransactionOptions

MaxAttempts

public int MaxAttempts { get; }

The number of times the transaction will be attempted before failing. This is equivalent to MaxAttempts.

Property Value
Type Description
int

RetrySettings

public RetrySettings RetrySettings { get; }

The settings to control the timing of retries within the transaction. The RetryFilter property is ignored. This property is never null.

Property Value
Type Description
RetrySettings

Methods

ForMaxAttempts(int)

public static TransactionOptions ForMaxAttempts(int maxAttempts)

Creates an instance with the given maximum number of attempts. The default retry timing will be used.

Parameter
Name Description
maxAttempts int

The number of times a transaction will be attempted before failing. Must be positive.

Returns
Type Description
TransactionOptions

A new options object.

ForRetrySettings(RetrySettings)

public static TransactionOptions ForRetrySettings(RetrySettings retrySettings)

Creates an instance with the given retry settings, including maximum number of attempts. The RetryFilter property is not used.

Parameter
Name Description
retrySettings RetrySettings

The retry settings to use. Must not be null.

Returns
Type Description
TransactionOptions

A new options object.