FailoverGroupReadWriteEndpoint Class

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

Implements

public final class FailoverGroupReadWriteEndpoint
implements JsonSerializable<FailoverGroupReadWriteEndpoint>

Read-write endpoint of the failover group instance.

Constructor Summary

Constructor Description
FailoverGroupReadWriteEndpoint()

Creates an instance of FailoverGroupReadWriteEndpoint 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 FailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader)

Reads an instance of FailoverGroupReadWriteEndpoint from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

FailoverGroupReadWriteEndpoint withFailoverPolicy(ReadWriteEndpointFailoverPolicy failoverPolicy)

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

FailoverGroupReadWriteEndpoint 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

FailoverGroupReadWriteEndpoint

public FailoverGroupReadWriteEndpoint()

Creates an instance of FailoverGroupReadWriteEndpoint 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 FailoverGroupReadWriteEndpoint fromJson(JsonReader jsonReader)

Reads an instance of FailoverGroupReadWriteEndpoint from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FailoverGroupReadWriteEndpoint 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 FailoverGroupReadWriteEndpoint 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 FailoverGroupReadWriteEndpoint object itself.

withFailoverWithDataLossGracePeriodMinutes

public FailoverGroupReadWriteEndpoint 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 FailoverGroupReadWriteEndpoint object itself.

Applies to