Partilhar via


CosmosDBAccount.DefinitionStages.WithConsistencyPolicy Interface

public static interface CosmosDBAccount.DefinitionStages.WithConsistencyPolicy

The stage of the cosmos db definition allowing to set the consistency policy.

Method Summary

Modifier and Type Method and Description
abstract WithWriteReplication withBoundedStalenessConsistency(long maxStalenessPrefix, int maxIntervalInSeconds)

The bounded staleness consistency policy for the CosmosDB account.

abstract WithWriteReplication withEventualConsistency()

The eventual consistency policy for the CosmosDB account.

abstract WithWriteReplication withSessionConsistency()

The session consistency policy for the CosmosDB account.

abstract WithCreate withStrongConsistency()

The strong consistency policy for the CosmosDB account.

Method Details

withBoundedStalenessConsistency

public abstract CosmosDBAccount.DefinitionStages.WithWriteReplication withBoundedStalenessConsistency(long maxStalenessPrefix, int maxIntervalInSeconds)

The bounded staleness consistency policy for the CosmosDB account.

Parameters:

maxStalenessPrefix - the max staleness prefix
maxIntervalInSeconds - the max interval in seconds

Returns:

the next stage of the definition

withEventualConsistency

public abstract CosmosDBAccount.DefinitionStages.WithWriteReplication withEventualConsistency()

The eventual consistency policy for the CosmosDB account.

Returns:

the next stage of the definition

withSessionConsistency

public abstract CosmosDBAccount.DefinitionStages.WithWriteReplication withSessionConsistency()

The session consistency policy for the CosmosDB account.

Returns:

the next stage of the definition

withStrongConsistency

public abstract CosmosDBAccount.DefinitionStages.WithCreate withStrongConsistency()

The strong consistency policy for the CosmosDB account.

Returns:

the next stage of the definition

Applies to