-
Notifications
You must be signed in to change notification settings - Fork 494
/
ConsistencyLevel.cs
46 lines (41 loc) · 2.02 KB
/
ConsistencyLevel.cs
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
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace Microsoft.Azure.Cosmos
{
//Should match string in SchemaConstants.h :: ConsistencyLevel
/// <summary>
/// These are the consistency levels supported by the Azure Cosmos DB service.
/// </summary>
/// <remarks>
/// The requested Consistency Level must match or be weaker than that provisioned for the database account.
/// </remarks>
/// <seealso href="https://docs.microsoft.com/azure/cosmos-db/consistency-levels"/>
public enum ConsistencyLevel
{
/// <summary>
/// Strong Consistency guarantees that read operations always return the value that was last written.
/// </summary>
Strong,
/// <summary>
/// Bounded Staleness guarantees that reads are not too out-of-date. This can be configured based on number of operations (MaxStalenessPrefix)
/// or time (MaxStalenessIntervalInSeconds). For more information on MaxStalenessPrefix and MaxStalenessIntervalInSeconds, please see <see cref="AccountConsistency"/>.
/// </summary>
BoundedStaleness,
/// <summary>
/// Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic writes (writes are ordered)
/// and read your writes (your writes are immediately visible to your reads) within any single session.
/// </summary>
Session,
/// <summary>
/// Eventual Consistency guarantees that reads will return a subset of writes. All writes
/// will be eventually be available for reads.
/// </summary>
Eventual,
/// <summary>
/// ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps.
/// All writes will be eventually be available for reads.
/// </summary>
ConsistentPrefix
}
}