Class Replica
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.Replica
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Replica>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapacity()Get the capacity property: Maximum number of read replicas allowed for a server.static ReplicafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Replica from the JsonReader.Get the promoteMode property: Type of operation to apply on the read replica.Get the promoteOption property: Data synchronization option to use when processing the operation specified in the promoteMode property.Get the replicationState property: Indicates the replication state of a read replica.role()Get the role property: Role of the server in a replication set.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withPromoteMode(ReadReplicaPromoteMode promoteMode) Set the promoteMode property: Type of operation to apply on the read replica.withPromoteOption(ReadReplicaPromoteOption promoteOption) Set the promoteOption property: Data synchronization option to use when processing the operation specified in the promoteMode property.withRole(ReplicationRole role) Set the role property: Role of the server in a replication set.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Replica
public Replica()Creates an instance of Replica class.
-
-
Method Details
-
role
Get the role property: Role of the server in a replication set.- Returns:
- the role value.
-
withRole
Set the role property: Role of the server in a replication set.- Parameters:
role- the role value to set.- Returns:
- the Replica object itself.
-
capacity
Get the capacity property: Maximum number of read replicas allowed for a server.- Returns:
- the capacity value.
-
replicationState
Get the replicationState property: Indicates the replication state of a read replica. This property is returned only when the target server is a read replica. Possible values are Active, Broken, Catchup, Provisioning, Reconfiguring, and Updating.- Returns:
- the replicationState value.
-
promoteMode
Get the promoteMode property: Type of operation to apply on the read replica. This property is write only. Standalone means that the read replica will be promoted to a standalone server, and will become a completely independent entity from the replication set. Switchover means that the read replica will roles with the primary server.- Returns:
- the promoteMode value.
-
withPromoteMode
Set the promoteMode property: Type of operation to apply on the read replica. This property is write only. Standalone means that the read replica will be promoted to a standalone server, and will become a completely independent entity from the replication set. Switchover means that the read replica will roles with the primary server.- Parameters:
promoteMode- the promoteMode value to set.- Returns:
- the Replica object itself.
-
promoteOption
Get the promoteOption property: Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only.- Returns:
- the promoteOption value.
-
withPromoteOption
Set the promoteOption property: Data synchronization option to use when processing the operation specified in the promoteMode property. This property is write only.- Parameters:
promoteOption- the promoteOption value to set.- Returns:
- the Replica object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Replica>- Throws:
IOException
-
fromJson
Reads an instance of Replica from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Replica if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the Replica.
-