-
Notifications
You must be signed in to change notification settings - Fork 257
/
TransactionalBatchRequestOptions.xml
110 lines (109 loc) · 6.79 KB
/
TransactionalBatchRequestOptions.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<Type Name="TransactionalBatchRequestOptions" FullName="Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions">
<TypeSignature Language="C#" Value="public class TransactionalBatchRequestOptions : Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit TransactionalBatchRequestOptions extends Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions" />
<TypeSignature Language="VB.NET" Value="Public Class TransactionalBatchRequestOptions
Inherits RequestOptions" />
<TypeSignature Language="F#" Value="type TransactionalBatchRequestOptions = class
 inherit RequestOptions" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.36.0.0</AssemblyVersion>
<AssemblyVersion>3.38.1.0</AssemblyVersion>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Azure.Cosmos.RequestOptions</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Cosmos batch request options.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TransactionalBatchRequestOptions ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.ConsistencyLevel? ConsistencyLevel { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Cosmos.ConsistencyLevel> ConsistencyLevel" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.ConsistencyLevel" />
<MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" />
<MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel> with get, set" Usage="Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.ConsistencyLevel" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the consistency level required for the request in the Azure Cosmos DB service.
</summary>
<value>
The consistency level required for the request.
</value>
<remarks>
Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. <see cref="T:Microsoft.Azure.Cosmos.ConnectionPolicy" /><para>
While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level
for each individual request.
</para></remarks>
</Docs>
</Member>
<Member MemberName="SessionToken">
<MemberSignature Language="C#" Value="public string SessionToken { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SessionToken" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.SessionToken" />
<MemberSignature Language="VB.NET" Value="Public Property SessionToken As String" />
<MemberSignature Language="F#" Value="member this.SessionToken : string with get, set" Usage="Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.SessionToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the token for use with session consistency in the Azure Cosmos DB service.
</summary>
<value>
The token for use with session consistency.
</value>
<remarks>
One of the <see cref="P:Microsoft.Azure.Cosmos.TransactionalBatchRequestOptions.ConsistencyLevel" /> for Azure Cosmos DB is Session. In fact, this is the default level applied to accounts.
<para>
When working with Session consistency, each batch request with write operation to Azure Cosmos DB is assigned a new SessionToken.
The CosmosClient will use this token internally with each read/query/batch request to ensure that the set
consistency level is maintained.
<para>
In some scenarios you need to manage this Session yourself;
Consider a web application with multiple nodes, each node will have its own instance of <see cref="T:Microsoft.Azure.Cosmos.CosmosClient" />
If you wanted these nodes to participate in the same session (to be able read your own writes consistently across web tiers)
you would have to send the SessionToken from <see cref="T:Microsoft.Azure.Cosmos.TransactionalBatchResponse" /> of the write action on one node
to the client tier, using a cookie or some other mechanism, and have that token flow back to the web tier for subsequent reads.
If you are using a round-robin load balancer which does not maintain session affinity between requests, such as the Azure Load Balancer,
the read could potentially land on a different node to the write request, where the session was created.
</para><para>
If you do not flow the Azure Cosmos DB SessionToken across as described above you could end up with inconsistent read results for a period of time.
</para></para><see href="https://docs.microsoft.com/azure/cosmos-db/consistency-levels" /></remarks>
</Docs>
</Member>
</Members>
</Type>