你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ConsistencyLevel Enum
- java.
lang. Object - java.
lang. Enum - com.
azure. cosmos. ConsistencyLevel
- com.
- java.
public enum ConsistencyLevel
extends Enum<ConsistencyLevel>
Represents the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos DB service.
The requested ConsistencyLevel must match or be weaker than that provisioned for the database account. Consistency levels by order of strength are STRONG, BOUNDED_STALENESS, SESSION and EVENTUAL. Refer to consistency level documentation for additional details: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels
Fields
BOUNDED_STALENESS |
Bounded Staleness guarantees that reads are not too out-of-date. |
CONSISTENT_PREFIX |
CONSISTENT_PREFIX Consistency guarantees that reads will return some prefix of all writes with no gaps. |
EVENTUAL |
EVENTUAL Consistency guarantees that reads will return a subset of writes. |
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. |
STRONG |
STRONG Consistency guarantees that read operations always return the value that was last written. |