Class TransactionOptions
Immutable class representing options for executing transactions.
Namespace: Google.Cloud.Firestore
Assembly: Google.Cloud.Firestore.dll
Syntax
public sealed class TransactionOptions
Properties
Default
The transaction options that are used if nothing is specified by the caller.
Declaration
public static TransactionOptions Default { get; }
Property Value
Type | Description |
---|---|
TransactionOptions |
MaxAttempts
The number of times the transaction will be attempted before failing. This is equivalent to MaxAttempts.
Declaration
public int MaxAttempts { get; }
Property Value
Type | Description |
---|---|
int |
RetrySettings
The settings to control the timing of retries within the transaction. The RetryFilter property is ignored. This property is never null.
Declaration
public RetrySettings RetrySettings { get; }
Property Value
Type | Description |
---|---|
RetrySettings |
Methods
ForMaxAttempts(int)
Creates an instance with the given maximum number of attempts. The default retry timing will be used.
Declaration
public static TransactionOptions ForMaxAttempts(int maxAttempts)
Parameters
Type | Name | Description |
---|---|---|
int | maxAttempts | The number of times a transaction will be attempted before failing. Must be positive. |
Returns
Type | Description |
---|---|
TransactionOptions | A new options object. |
ForRetrySettings(RetrySettings)
Creates an instance with the given retry settings, including maximum number of attempts. The RetryFilter property is not used.
Declaration
public static TransactionOptions ForRetrySettings(RetrySettings retrySettings)
Parameters
Type | Name | Description |
---|---|---|
RetrySettings | retrySettings | The retry settings to use. Must not be null. |
Returns
Type | Description |
---|---|
TransactionOptions | A new options object. |