Class RetryAndTimeoutExternalServiceProperties
java.lang.Object
com.broadleafcommerce.search.util.properties.RetryAndTimeoutExternalServiceProperties
Configuration properties to support end-to-end timeout and retry behavior.
This class is intended to be used as a
NestedConfigurationProperty within any
provider-specific configuration that needs to participate in standardized timeout and retry
handling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThis is an end-to-end timeout for sending the request as well as getting back a complete response.intThe maximum number of times to retry a failed request.The minimum duration for the first backoff.inthashCode()booleanIndicates if the wait time should be increased by the previous wait time on each tryvoidsetEndToEndTimeout(Duration endToEndTimeout) This is an end-to-end timeout for sending the request as well as getting back a complete response.voidsetRetryMaxAttempts(int retryMaxAttempts) The maximum number of times to retry a failed request.voidsetRetryMinBackoffDuration(Duration retryMinBackoffDuration) The minimum duration for the first backoff.voidsetWaitTimeAdditive(boolean waitTimeAdditive) Indicates if the wait time should be increased by the previous wait time on each trytoString()
-
Constructor Details
-
RetryAndTimeoutExternalServiceProperties
public RetryAndTimeoutExternalServiceProperties()
-
-
Method Details
-
getRetryMaxAttempts
public int getRetryMaxAttempts()The maximum number of times to retry a failed request. -
getEndToEndTimeout
This is an end-to-end timeout for sending the request as well as getting back a complete response. This is useful to put a maximum bound on an API call, regardless of what happens. -
getRetryMinBackoffDuration
The minimum duration for the first backoff. -
isWaitTimeAdditive
public boolean isWaitTimeAdditive()Indicates if the wait time should be increased by the previous wait time on each try -
setRetryMaxAttempts
public void setRetryMaxAttempts(int retryMaxAttempts) The maximum number of times to retry a failed request. -
setEndToEndTimeout
This is an end-to-end timeout for sending the request as well as getting back a complete response. This is useful to put a maximum bound on an API call, regardless of what happens. -
setRetryMinBackoffDuration
The minimum duration for the first backoff. -
setWaitTimeAdditive
public void setWaitTimeAdditive(boolean waitTimeAdditive) Indicates if the wait time should be increased by the previous wait time on each try -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-