Class CommonRetryConfigurationProperties.InstanceProperties
java.lang.Object
io.github.resilience4j.common.retry.configuration.CommonRetryConfigurationProperties.InstanceProperties
- Enclosing class:
CommonRetryConfigurationProperties
Class storing property values for configuring
Retry
instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Class<? extends BiConsumer<Integer, Object>> class to be used to perform post actions on the object if it needs to be retriedprivate Booleanflag to enable Exponential backoff policy or not for retry policy delayprivate Booleanflag to enable randomized delay policy or not for retry policy delayprivate Integerevent buffer size for generated retry eventsprivate Doubleexponential backoff multiplier valueprivate Durationexponential max interval valueprivate Booleanflag to enable explicit MaxRetriesExceededException to be thrown when max retries are exceededlist of retry ignored exception classesprivate Integerprivate Doublerandomized delay factor valueretry setResultPredicate predicate class to be used to evaluate the result to retry or notretry exception predicate class to be used to evaluate the exception to retry or notlist of retry exception classesprivate Duration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the shared configuration name.(package private) Class<? extends BiConsumer<Integer, Object>> setBaseConfig(String baseConfig) Sets the shared configuration name.setConsumeResultBeforeRetryAttempt(Class<? extends BiConsumer<Integer, Object>> consumer) setEnableExponentialBackoff(Boolean enableExponentialBackoff) setEnableRandomizedWait(Boolean enableRandomizedWait) setEventConsumerBufferSize(Integer eventConsumerBufferSize) setExponentialBackoffMultiplier(Double exponentialBackoffMultiplier) setExponentialMaxWaitDuration(Duration exponentialMaxWaitDuration) setFailAfterMaxAttempts(Boolean failAfterMaxAttempts) setIgnoreExceptions(Class<? extends Throwable>[] ignoreExceptions) voidsetIntervalBiFunction(Class<? extends io.github.resilience4j.core.IntervalBiFunction<Object>> intervalBiFunction) setMaxAttempts(Integer maxAttempts) setRandomizedWaitFactor(Double randomizedWaitFactor) setResultPredicate(Class<? extends Predicate<Object>> resultPredicate) setRetryExceptionPredicate(Class<? extends Predicate<Throwable>> retryExceptionPredicate) setRetryExceptions(Class<? extends Throwable>[] retryExceptions) setWaitDuration(Duration waitDuration)
-
Field Details
-
waitDuration
-
intervalBiFunction
-
maxAttempts
-
retryExceptionPredicate
retry exception predicate class to be used to evaluate the exception to retry or not -
resultPredicate
retry setResultPredicate predicate class to be used to evaluate the result to retry or not -
consumeResultBeforeRetryAttempt
class to be used to perform post actions on the object if it needs to be retried -
retryExceptions
list of retry exception classes -
ignoreExceptions
list of retry ignored exception classes -
eventConsumerBufferSize
event buffer size for generated retry events -
enableExponentialBackoff
flag to enable Exponential backoff policy or not for retry policy delay -
exponentialBackoffMultiplier
exponential backoff multiplier value -
exponentialMaxWaitDuration
exponential max interval value -
enableRandomizedWait
flag to enable randomized delay policy or not for retry policy delay -
randomizedWaitFactor
randomized delay factor value -
failAfterMaxAttempts
flag to enable explicit MaxRetriesExceededException to be thrown when max retries are exceeded -
baseConfig
-
-
Constructor Details
-
InstanceProperties
public InstanceProperties()
-
-
Method Details
-
getWaitDuration
-
setWaitDuration
-
getIntervalBiFunction
-
setIntervalBiFunction
-
getMaxAttempts
-
setMaxAttempts
-
getRetryExceptionPredicate
-
setRetryExceptionPredicate
public CommonRetryConfigurationProperties.InstanceProperties setRetryExceptionPredicate(Class<? extends Predicate<Throwable>> retryExceptionPredicate) -
getResultPredicate
-
setResultPredicate
public CommonRetryConfigurationProperties.InstanceProperties setResultPredicate(Class<? extends Predicate<Object>> resultPredicate) -
getConsumeResultBeforeRetryAttempt
-
setConsumeResultBeforeRetryAttempt
public CommonRetryConfigurationProperties.InstanceProperties setConsumeResultBeforeRetryAttempt(Class<? extends BiConsumer<Integer, Object>> consumer) -
getRetryExceptions
-
setRetryExceptions
public CommonRetryConfigurationProperties.InstanceProperties setRetryExceptions(Class<? extends Throwable>[] retryExceptions) -
getIgnoreExceptions
-
setIgnoreExceptions
public CommonRetryConfigurationProperties.InstanceProperties setIgnoreExceptions(Class<? extends Throwable>[] ignoreExceptions) -
getEventConsumerBufferSize
-
setEventConsumerBufferSize
public CommonRetryConfigurationProperties.InstanceProperties setEventConsumerBufferSize(Integer eventConsumerBufferSize) -
getEnableExponentialBackoff
-
setEnableExponentialBackoff
public CommonRetryConfigurationProperties.InstanceProperties setEnableExponentialBackoff(Boolean enableExponentialBackoff) -
getExponentialBackoffMultiplier
-
setExponentialBackoffMultiplier
public CommonRetryConfigurationProperties.InstanceProperties setExponentialBackoffMultiplier(Double exponentialBackoffMultiplier) -
getExponentialMaxWaitDuration
-
setExponentialMaxWaitDuration
public CommonRetryConfigurationProperties.InstanceProperties setExponentialMaxWaitDuration(Duration exponentialMaxWaitDuration) -
getEnableRandomizedWait
-
setEnableRandomizedWait
public CommonRetryConfigurationProperties.InstanceProperties setEnableRandomizedWait(Boolean enableRandomizedWait) -
getRandomizedWaitFactor
-
setRandomizedWaitFactor
public CommonRetryConfigurationProperties.InstanceProperties setRandomizedWaitFactor(Double randomizedWaitFactor) -
getFailAfterMaxAttempts
-
setFailAfterMaxAttempts
public CommonRetryConfigurationProperties.InstanceProperties setFailAfterMaxAttempts(Boolean failAfterMaxAttempts) -
getBaseConfig
Gets the shared configuration name. If this is set, the configuration builder will use the shared configuration backend over this one.- Returns:
- The shared configuration name.
-
setBaseConfig
Sets the shared configuration name. If this is set, the configuration builder will use the shared configuration backend over this one.- Parameters:
baseConfig- The shared configuration name.
-