public static final class RetryInterceptorBuilder.StatefulRetryInterceptorBuilder extends RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder, RetryInterceptorBuilder.StatelessRetryInterceptorBuilder
Modifier and Type | Method and Description |
---|---|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
backOffOptions(long initialInterval,
double multiplier,
long maxInterval)
Apply the backoff options.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
backOffPolicy(org.springframework.retry.backoff.BackOffPolicy policy)
Apply the back off policy.
|
org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor |
build() |
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
maxAttempts(int maxAttempts)
Apply the max attempts - a SimpleRetryPolicy will be used.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
messageKeyGenerator(MessageKeyGenerator messageKeyGenerator)
Stateful retry requires messages to be identifiable.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
newMessageIdentifier(NewMessageIdentifier newMessageIdentifier)
Apply a custom new message identifier.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
recoverer(MessageRecoverer recoverer)
Apply a Message recoverer - default is to log and discard after retry is exhausted.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
retryOperations(org.springframework.retry.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.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
retryPolicy(org.springframework.retry.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.
|
applyCommonSettings, stateful, stateless
public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder messageKeyGenerator(MessageKeyGenerator messageKeyGenerator)
messageKeyGenerator
- The key generator.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder newMessageIdentifier(NewMessageIdentifier newMessageIdentifier)
newMessageIdentifier
- The new message identifier.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder retryOperations(org.springframework.retry.RetryOperations retryOperations)
RetryInterceptorBuilder
retryOperations
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
retryOperations
- The retry operations.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder maxAttempts(int maxAttempts)
RetryInterceptorBuilder
maxAttempts
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
maxAttempts
- the max attempts.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder backOffOptions(long initialInterval, double multiplier, long maxInterval)
RetryInterceptorBuilder
backOffOptions
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
initialInterval
- The initial interval.multiplier
- The multiplier.maxInterval
- The max interval.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder retryPolicy(org.springframework.retry.RetryPolicy policy)
RetryInterceptorBuilder
retryPolicy
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
policy
- The policy.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder backOffPolicy(org.springframework.retry.backoff.BackOffPolicy policy)
RetryInterceptorBuilder
backOffPolicy
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
policy
- The policy.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder recoverer(MessageRecoverer recoverer)
RetryInterceptorBuilder
recoverer
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>
recoverer
- The recoverer.public org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor build()
build
in class RetryInterceptorBuilder<org.springframework.retry.interceptor.StatefulRetryOperationsInterceptor>