ConsistencyPolicy Class
- java.
lang. Object - JsonSerializable
- com.
microsoft. azure. cosmosdb. ConsistencyPolicy
- com.
public class ConsistencyPolicy extends JsonSerializable
Encapsulates the settings for consistency policy in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
ConsistencyPolicy(String jsonString) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Consistency |
getDefaultConsistencyLevel()
Get the name of the resource. |
int |
getMaxStalenessIntervalInSeconds()
Gets the in bounded staleness consistency, the maximum allowed staleness in terms time interval. |
int |
getMaxStalenessPrefix()
Gets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers (aka version). |
void |
setDefaultConsistencyLevel(ConsistencyLevel level)
Set the name of the resource. |
void |
setMaxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds)
Sets the in bounded staleness consistency, the maximum allowed staleness in terms time interval. |
void |
setMaxStalenessPrefix(int maxStalenessPrefix)
Sets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers (aka version). |
Inherited Members
Constructor Details
ConsistencyPolicy
public ConsistencyPolicy(String jsonString)
Constructor.
Parameters:
Method Details
getDefaultConsistencyLevel
public ConsistencyLevel getDefaultConsistencyLevel()
Get the name of the resource.
Returns:
getMaxStalenessIntervalInSeconds
public int getMaxStalenessIntervalInSeconds()
Gets the in bounded staleness consistency, the maximum allowed staleness in terms time interval.
Returns:
getMaxStalenessPrefix
public int getMaxStalenessPrefix()
Gets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers (aka version).
Returns:
setDefaultConsistencyLevel
public void setDefaultConsistencyLevel(ConsistencyLevel level)
Set the name of the resource.
Parameters:
setMaxStalenessIntervalInSeconds
public void setMaxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds)
Sets the in bounded staleness consistency, the maximum allowed staleness in terms time interval.
Parameters:
setMaxStalenessPrefix
public void setMaxStalenessPrefix(int maxStalenessPrefix)
Sets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers (aka version).
Parameters:
Applies to
Azure SDK for Java