public enum ConsistencyLevel extends Enum<ConsistencyLevel>
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
Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
String |
toString() |
static ConsistencyLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConsistencyLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConsistencyLevel STRONG
public static final ConsistencyLevel BOUNDED_STALENESS
public static final ConsistencyLevel SESSION
public static final ConsistencyLevel EVENTUAL
public static final ConsistencyLevel CONSISTENT_PREFIX
public static ConsistencyLevel[] values()
public static ConsistencyLevel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<ConsistencyLevel>
Copyright © 2021 Microsoft Corporation. All rights reserved.