Firestore API - Class TransactionOptions (3.5.1)

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
TypeDescription
TransactionOptions

MaxAttempts

public int MaxAttempts { get; }

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

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
maxAttemptsint

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

Returns
TypeDescription
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
NameDescription
retrySettingsRetrySettings

The retry settings to use. Must not be null.

Returns
TypeDescription
TransactionOptions

A new options object.