Dela via


ConsistencyPolicy Class

Definition

The consistency policy for the Cosmos DB database account.

public class ConsistencyPolicy
type ConsistencyPolicy = class
Public Class ConsistencyPolicy
Inheritance
ConsistencyPolicy

Constructors

ConsistencyPolicy()

Initializes a new instance of the ConsistencyPolicy class.

ConsistencyPolicy(DefaultConsistencyLevel, Nullable<Int64>, Nullable<Int32>)

Initializes a new instance of the ConsistencyPolicy class.

Properties

DefaultConsistencyLevel

Gets or sets the default consistency level and configuration settings of the Cosmos DB account. Possible values include: 'Eventual', 'Session', 'BoundedStaleness', 'Strong', 'ConsistentPrefix'

MaxIntervalInSeconds

Gets or sets when used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.

MaxStalenessPrefix

Gets or sets when used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.

Methods

Validate()

Validate the object.

Applies to