Udostępnij za pośrednictwem


RetryPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.eventgrid.models.RetryPolicy

Implements

public final class RetryPolicy
implements JsonSerializable<RetryPolicy>

Information about the retry policy for an event subscription.

Constructor Summary

Constructor Description
RetryPolicy()

Creates an instance of RetryPolicy class.

Method Summary

Modifier and Type Method and Description
Integer eventTimeToLiveInMinutes()

Get the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.

static RetryPolicy fromJson(JsonReader jsonReader)

Reads an instance of RetryPolicy from the JsonReader.

Integer maxDeliveryAttempts()

Get the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes)

Set the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.

RetryPolicy withMaxDeliveryAttempts(Integer maxDeliveryAttempts)

Set the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.

Methods inherited from java.lang.Object

Constructor Details

RetryPolicy

public RetryPolicy()

Creates an instance of RetryPolicy class.

Method Details

eventTimeToLiveInMinutes

public Integer eventTimeToLiveInMinutes()

Get the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.

Returns:

the eventTimeToLiveInMinutes value.

fromJson

public static RetryPolicy fromJson(JsonReader jsonReader)

Reads an instance of RetryPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

maxDeliveryAttempts

public Integer maxDeliveryAttempts()

Get the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.

Returns:

the maxDeliveryAttempts value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withEventTimeToLiveInMinutes

public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes)

Set the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.

Parameters:

eventTimeToLiveInMinutes - the eventTimeToLiveInMinutes value to set.

Returns:

the RetryPolicy object itself.

withMaxDeliveryAttempts

public RetryPolicy withMaxDeliveryAttempts(Integer maxDeliveryAttempts)

Set the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.

Parameters:

maxDeliveryAttempts - the maxDeliveryAttempts value to set.

Returns:

the RetryPolicy object itself.

Applies to