Partager via


InstanceFailoverGroupReadWriteEndpoint Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.models.InstanceFailoverGroupReadWriteEndpoint

Implements

public final class InstanceFailoverGroupReadWriteEndpoint
implements JsonSerializable<InstanceFailoverGroupReadWriteEndpoint>

Read-write endpoint of the failover group instance.

Constructor Summary

Constructor Description
InstanceFailoverGroupReadWriteEndpoint()

Creates an instance of InstanceFailoverGroupReadWriteEndpoint class.

Method Summary

Modifier and Type Method and Description
ReadWriteEndpointFailoverPolicy failoverPolicy()

Get the failoverPolicy property: Failover policy of the read-write endpoint for the failover group.

Integer failoverWithDataLossGracePeriodMinutes()

Get the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted for the read-write endpoint.

static InstanceFailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader)

Reads an instance of InstanceFailoverGroupReadWriteEndpoint from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

InstanceFailoverGroupReadWriteEndpoint withFailoverPolicy(ReadWriteEndpointFailoverPolicy failoverPolicy)

Set the failoverPolicy property: Failover policy of the read-write endpoint for the failover group.

InstanceFailoverGroupReadWriteEndpoint withFailoverWithDataLossGracePeriodMinutes(Integer failoverWithDataLossGracePeriodMinutes)

Set the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted for the read-write endpoint.

Methods inherited from java.lang.Object

Constructor Details

InstanceFailoverGroupReadWriteEndpoint

public InstanceFailoverGroupReadWriteEndpoint()

Creates an instance of InstanceFailoverGroupReadWriteEndpoint class.

Method Details

failoverPolicy

public ReadWriteEndpointFailoverPolicy failoverPolicy()

Get the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

Returns:

the failoverPolicy value.

failoverWithDataLossGracePeriodMinutes

public Integer failoverWithDataLossGracePeriodMinutes()

Get the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

Returns:

the failoverWithDataLossGracePeriodMinutes value.

fromJson

public static InstanceFailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader)

Reads an instance of InstanceFailoverGroupReadWriteEndpoint from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of InstanceFailoverGroupReadWriteEndpoint if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFailoverPolicy

public InstanceFailoverGroupReadWriteEndpoint withFailoverPolicy(ReadWriteEndpointFailoverPolicy failoverPolicy)

Set the failoverPolicy property: Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

Parameters:

failoverPolicy - the failoverPolicy value to set.

Returns:

the InstanceFailoverGroupReadWriteEndpoint object itself.

withFailoverWithDataLossGracePeriodMinutes

public InstanceFailoverGroupReadWriteEndpoint withFailoverWithDataLossGracePeriodMinutes(Integer failoverWithDataLossGracePeriodMinutes)

Set the failoverWithDataLossGracePeriodMinutes property: Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.

Parameters:

failoverWithDataLossGracePeriodMinutes - the failoverWithDataLossGracePeriodMinutes value to set.

Returns:

the InstanceFailoverGroupReadWriteEndpoint object itself.

Applies to