AmqpRetryOptions Class
- java.
lang. Object - com.
azure. core. amqp. AmqpRetryOptions
- com.
public class AmqpRetryOptions
A set of options that can be specified to influence how retry attempts are made.
Constructor Summary
| Constructor | Description |
|---|---|
| AmqpRetryOptions() |
Creates an instance with the default retry options set. |
| AmqpRetryOptions(AmqpRetryOptions retryOptions) |
Creates an instance configured with |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean | equals(Object obj) |
| Duration |
getDelay()
Gets the delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-approach. |
| Duration |
getMaxDelay()
Gets the maximum permissible delay between retry attempts. |
| int |
getMaxRetries()
The maximum number of retry attempts before considering the associated operation to have failed. |
|
Amqp |
getMode()
Gets the approach to use for calculating retry delays. |
| Duration |
getTryTimeout()
Gets the maximum duration to wait for completion of a single attempt, whether the initial attempt or a retry. |
| int | hashCode() |
|
Amqp |
setDelay(Duration delay)
Gets the delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-approach. |
|
Amqp |
setMaxDelay(Duration maximumDelay)
Sets the maximum permissible delay between retry attempts. |
|
Amqp |
setMaxRetries(int numberOfRetries)
Sets the maximum number of retry attempts before considering the associated operation to have failed. |
|
Amqp |
setMode(AmqpRetryMode retryMode)
Sets the approach to use for calculating retry delays. |
|
Amqp |
setTryTimeout(Duration tryTimeout)
Sets the maximum duration to wait for completion of a single attempt, whether the initial attempt or a retry. |
Methods inherited from java.lang.Object
Constructor Details
AmqpRetryOptions
public AmqpRetryOptions()
Creates an instance with the default retry options set.
AmqpRetryOptions
public AmqpRetryOptions(AmqpRetryOptions retryOptions)
Creates an instance configured with retryOptions. This is not thread-safe.
Parameters:
Method Details
equals
public boolean equals(Object obj)
Overrides:
AmqpRetryOptions.equals(Object obj)Parameters:
getDelay
public Duration getDelay()
Gets the delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-approach.
Returns:
getMaxDelay
public Duration getMaxDelay()
Gets the maximum permissible delay between retry attempts.
Returns:
getMaxRetries
public int getMaxRetries()
The maximum number of retry attempts before considering the associated operation to have failed.
Returns:
getMode
public AmqpRetryMode getMode()
Gets the approach to use for calculating retry delays.
Returns:
getTryTimeout
public Duration getTryTimeout()
Gets the maximum duration to wait for completion of a single attempt, whether the initial attempt or a retry.
Returns:
hashCode
public int hashCode()
Overrides:
AmqpRetryOptions.hashCode()setDelay
public AmqpRetryOptions setDelay(Duration delay)
Gets the delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-approach.
Parameters:
Returns:
setMaxDelay
public AmqpRetryOptions setMaxDelay(Duration maximumDelay)
Sets the maximum permissible delay between retry attempts.
Parameters:
Returns:
setMaxRetries
public AmqpRetryOptions setMaxRetries(int numberOfRetries)
Sets the maximum number of retry attempts before considering the associated operation to have failed.
Parameters:
Returns:
setMode
public AmqpRetryOptions setMode(AmqpRetryMode retryMode)
Sets the approach to use for calculating retry delays.
Parameters:
Returns:
setTryTimeout
public AmqpRetryOptions setTryTimeout(Duration tryTimeout)
Sets the maximum duration to wait for completion of a single attempt, whether the initial attempt or a retry.
Parameters:
Returns: