public sealed class SpannerTransactionOptions
Reference documentation and code samples for the Google.Cloud.Spanner.Data class SpannerTransactionOptions.
Options that may be applied to a transaction after creation, usually before committing the transaction or before executing the first transactional statement.
Namespace
Google.Cloud.Spanner.DataAssembly
Google.Cloud.Spanner.Data.dll
Remarks
As opposed to SpannerTransactionCreationOptions, instances of this class are mutable. This is useful for ORM and similar implementations that depend on ADO.NET for transaction and command creation, which does not know about these Spanner specific options. These implementations may still access transaction and commands after creation and change these options.
Constructors
SpannerTransactionOptions()
public SpannerTransactionOptions()
Creates an instance of SpannerTransactionOptions with default values.
SpannerTransactionOptions(SpannerTransactionOptions)
public SpannerTransactionOptions(SpannerTransactionOptions other)
Creates an instance of SpannerTransactionOptions with the same values as other
.
Parameter | |
---|---|
Name | Description |
other |
SpannerTransactionOptions The options to create this instance from. Must not be null. |
Properties
MaxCommitDelay
public TimeSpan? MaxCommitDelay { get; set; }
The maximum amount of time the commit may be delayed server side for batching with other commits. The bigger the delay, the better the throughput (QPS), but at the expense of commit latency. If set to Zero, commit batching is disabled. May be null, in which case commits will continue to be batched as they had been before this configuration option was made available to Spanner API consumers. May be set to any value between Zero and 500ms. Cannot be modified after commit or rollback has been called on the transaction.
Property Value | |
---|---|
Type | Description |
TimeSpan |