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.Data
Assembly: Google.Cloud.Spanner.Data.dll
Syntax
public sealed class SpannerTransactionOptions
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()
Creates an instance of SpannerTransactionOptions with default values.
Declaration
public SpannerTransactionOptions()
SpannerTransactionOptions(SpannerTransactionOptions)
Creates an instance of SpannerTransactionOptions with the same values as other
.
Declaration
public SpannerTransactionOptions(SpannerTransactionOptions other)
Parameters
Type | Name | Description |
---|---|---|
SpannerTransactionOptions | other | The options to create this instance from. Must not be null. |
Properties
MaxCommitDelay
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.
Declaration
public TimeSpan? MaxCommitDelay { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan? |