Class FailoverPolicy
java.lang.Object
com.microsoft.azure.management.cosmosdb.FailoverPolicy
The failover policy for a given region of a database account.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the failover priority of the region.id()
Get the unique identifier of the region in which the database account replicates to.Get the name of the region in which the database account exists.withFailoverPriority
(Integer failoverPriority) Set the failover priority of the region.withLocationName
(String locationName) Set the name of the region in which the database account exists.
-
Constructor Details
-
FailoverPolicy
public FailoverPolicy()
-
-
Method Details
-
id
Get the unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.- Returns:
- the id value
-
locationName
Get the name of the region in which the database account exists.- Returns:
- the locationName value
-
withLocationName
Set the name of the region in which the database account exists.- Parameters:
locationName
- the locationName value to set- Returns:
- the FailoverPolicy object itself.
-
failoverPriority
Get the failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.- Returns:
- the failoverPriority value
-
withFailoverPriority
Set the failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.- Parameters:
failoverPriority
- the failoverPriority value to set- Returns:
- the FailoverPolicy object itself.
-