ConsistencyLevel Class
Represents the consistency levels supported for Azure Cosmos client operations.
The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels.
Consistency levels by order of strength are Strong, BoundedStaleness, Session, ConsistentPrefix and Eventual.
- Inheritance
-
builtins.objectConsistencyLevel
Constructor
ConsistencyLevel()
Attributes
BoundedStaleness
Bounded Staleness guarantees that reads are not too out-of-date. This can be configured based on number of operations (MaxStalenessPrefix) or time (MaxStalenessIntervalInSeconds).
BoundedStaleness: Literal['BoundedStaleness'] = 'BoundedStaleness'
ConsistentPrefix
ConsistentPrefix Consistency guarantees that reads will return some prefix of all writes with no gaps. All writes will be eventually be available for reads.
ConsistentPrefix: Literal['ConsistentPrefix'] = 'ConsistentPrefix'
Eventual
Eventual Consistency guarantees that reads will return a subset of writes. All writes will be eventually be available for reads.
Eventual: Literal['Eventual'] = 'Eventual'
Session
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.
Session: Literal['Session'] = 'Session'
Strong
Strong Consistency guarantees that read operations always return the value that was last written.
Strong: Literal['Strong'] = 'Strong'
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應