Class RetryProperties
java.lang.Object
co.yellowdog.platform.model.RetryProperties
Defines properties that control services client retry behaviour
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder that can be used to build a new RetryProperties that is automatically validated on build. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryProperties.Builderbuilder()protected booleanbooleanThe initial interval before the first retry attempt.intSet the number of attempts before retries are exhausted.The maximum interval between retry attempts.inthashCode()voidsetInitialInterval(Duration initialInterval) The initial interval before the first retry attempt.voidsetMaxAttempts(int maxAttempts) Set the number of attempts before retries are exhausted.voidsetMaxInterval(Duration maxInterval) The maximum interval between retry attempts.toString()
-
Field Details
-
DEFAULT_MAX_ATTEMPTS
public static final int DEFAULT_MAX_ATTEMPTSThe default max attempt count (3)- See Also:
-
DEFAULT_INITIAL_RETRY_INTERVAL
The default initial retry interval (5 seconds) -
DEFAULT_MAX_RETRY_INTERVAL
The default maximum retry interval (1 minute)
-
-
Method Details
-
builder
-
toBuilder
-
getMaxAttempts
public int getMaxAttempts()Set the number of attempts before retries are exhausted. Includes the initial attempt before the retries begin.- Returns:
- the number of attempts before retries are exhausted
-
getInitialInterval
The initial interval before the first retry attempt.- Returns:
- the initial interval before the first retry attempt
-
getMaxInterval
The maximum interval between retry attempts.- Returns:
- the maximum interval between retry attempts
-
setMaxAttempts
public void setMaxAttempts(int maxAttempts) Set the number of attempts before retries are exhausted. Includes the initial attempt before the retries begin.- Parameters:
maxAttempts- the number of attempts before retries are exhausted
-
setInitialInterval
The initial interval before the first retry attempt.- Parameters:
initialInterval- the initial interval before the first retry attempt
-
setMaxInterval
The maximum interval between retry attempts.- Parameters:
maxInterval- the maximum interval between retry attempts
-
equals
-
canEqual
-
hashCode
-
toString
-