Class RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder
java.lang.Object
org.springframework.retry.interceptor.RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
org.springframework.retry.interceptor.RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder
- Enclosing class:
- RetryInterceptorBuilder<T extends org.aopalliance.intercept.MethodInterceptor>
public static class RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder
extends RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.retry.interceptor.RetryInterceptorBuilder
RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder, RetryInterceptorBuilder.StatefulRetryInterceptorBuilder, RetryInterceptorBuilder.StatelessRetryInterceptorBuilder
-
Field Summary
Fields inherited from class org.springframework.retry.interceptor.RetryInterceptorBuilder
label, recoverer, retryOperations, retryTemplate, simpleRetryPolicy
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
keyGenerator
(MethodArgumentsKeyGenerator keyGenerator) maxAttempts
(int maxAttempts) Apply the max attempts - a SimpleRetryPolicy will be used.recoverer
(MethodInvocationRecoverer<?> recoverer) Apply aMethodInvocationRecoverer
for the Retry interceptor.retryOperations
(RetryOperations retryOperations) Apply the retry operations - once this is set, other properties can no longer be set; can't be set if other properties have been applied.retryPolicy
(RetryPolicy policy) Apply the retry policy - cannot be used if a custom retry template has been provided, or the max attempts or back off options or policy have been applied.Methods inherited from class org.springframework.retry.interceptor.RetryInterceptorBuilder
backOffOptions, backOffPolicy, circuitBreaker, label, stateful, stateless
-
Method Details
-
retryOperations
public RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder retryOperations(RetryOperations retryOperations) Description copied from class:RetryInterceptorBuilder
Apply the retry operations - once this is set, other properties can no longer be set; can't be set if other properties have been applied.- Overrides:
retryOperations
in classRetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
- Parameters:
retryOperations
- The retry operations.- Returns:
- this.
-
maxAttempts
Description copied from class:RetryInterceptorBuilder
Apply the max attempts - a SimpleRetryPolicy will be used. Cannot be used if a custom retry operations or retry policy has been set.- Overrides:
maxAttempts
in classRetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
- Parameters:
maxAttempts
- the max attempts (including the initial attempt).- Returns:
- this.
-
retryPolicy
Description copied from class:RetryInterceptorBuilder
Apply the retry policy - cannot be used if a custom retry template has been provided, or the max attempts or back off options or policy have been applied.- Overrides:
retryPolicy
in classRetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
- Parameters:
policy
- The policy.- Returns:
- this.
-
keyGenerator
public RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder keyGenerator(MethodArgumentsKeyGenerator keyGenerator) -
recoverer
public RetryInterceptorBuilder.CircuitBreakerInterceptorBuilder recoverer(MethodInvocationRecoverer<?> recoverer) Description copied from class:RetryInterceptorBuilder
Apply aMethodInvocationRecoverer
for the Retry interceptor.- Overrides:
recoverer
in classRetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
- Parameters:
recoverer
- The recoverer.- Returns:
- this.
-
build
- Specified by:
build
in classRetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
-