Megosztás a következőn keresztül:


ConsistencyLevel Enum

Definition

These are the consistency levels supported by the Azure Cosmos DB service.

public enum ConsistencyLevel
type ConsistencyLevel = 
Public Enum ConsistencyLevel
Inheritance
ConsistencyLevel

Fields

Name Value Description
Strong 0

Strong Consistency guarantees that read operations always return the value that was last written.

BoundedStaleness 1

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 ConsistencyPolicy.

Session 2

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.

Eventual 3

Eventual Consistency guarantees that reads will return a subset of writes. All writes will be eventually be available for reads.

ConsistentPrefix 4

ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. All writes will be eventually be available for reads.

Remarks

The requested Consistency Level must match or be weaker than that provisioned for the database account. For more information on consistency levels, please see Consistency Levels article.

Applies to