Freigeben über


TcpRetryPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy

Implements

public final class TcpRetryPolicy
implements JsonSerializable<TcpRetryPolicy>

Policy that defines tcp request retry conditions.

Constructor Summary

Constructor Description
TcpRetryPolicy()

Creates an instance of TcpRetryPolicy class.

Method Summary

Modifier and Type Method and Description
static TcpRetryPolicy fromJson(JsonReader jsonReader)

Reads an instance of TcpRetryPolicy from the JsonReader.

Integer maxConnectAttempts()

Get the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

TcpRetryPolicy withMaxConnectAttempts(Integer maxConnectAttempts)

Set the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service.

Methods inherited from java.lang.Object

Constructor Details

TcpRetryPolicy

public TcpRetryPolicy()

Creates an instance of TcpRetryPolicy class.

Method Details

fromJson

public static TcpRetryPolicy fromJson(JsonReader jsonReader)

Reads an instance of TcpRetryPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TcpRetryPolicy 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 TcpRetryPolicy.

maxConnectAttempts

public Integer maxConnectAttempts()

Get the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service.

Returns:

the maxConnectAttempts value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMaxConnectAttempts

public TcpRetryPolicy withMaxConnectAttempts(Integer maxConnectAttempts)

Set the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service.

Parameters:

maxConnectAttempts - the maxConnectAttempts value to set.

Returns:

the TcpRetryPolicy object itself.

Applies to