public static class RetryInterceptorBuilder.StatefulRetryInterceptorBuilder extends RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder, RetryInterceptorBuilder.StatelessRetryInterceptorBuilder
recoverer, retryOperations, retryTemplate, simpleRetryPolicy
Modifier and Type | Method and Description |
---|---|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
backOffOptions(long initialInterval,
double multiplier,
long maxInterval)
Apply the backoff options.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
backOffPolicy(BackOffPolicy policy)
Apply the back off policy.
|
StatefulRetryOperationsInterceptor |
build() |
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
keyGenerator(MethodArgumentsKeyGenerator keyGenerator)
Stateful retry requires items to be identifiable.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
maxAttempts(int maxAttempts)
Apply the max attempts - a SimpleRetryPolicy will be used.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
newMethodArgumentsIdentifier(NewMethodArgumentsIdentifier newMethodArgumentsIdentifier)
Apply a custom new item identifier.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
recoverer(MethodInvocationRecoverer<?> recoverer)
Apply a
MethodInvocationRecoverer for the Retry interceptor. |
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
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.
|
RetryInterceptorBuilder.StatefulRetryInterceptorBuilder |
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.
|
stateful, stateless
public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder keyGenerator(MethodArgumentsKeyGenerator keyGenerator)
keyGenerator
- The key generator.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder newMethodArgumentsIdentifier(NewMethodArgumentsIdentifier newMethodArgumentsIdentifier)
newMethodArgumentsIdentifier
- The new item identifier.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder retryOperations(RetryOperations retryOperations)
RetryInterceptorBuilder
retryOperations
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
retryOperations
- The retry operations.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder maxAttempts(int maxAttempts)
RetryInterceptorBuilder
maxAttempts
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
maxAttempts
- the max attempts.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder backOffOptions(long initialInterval, double multiplier, long maxInterval)
RetryInterceptorBuilder
backOffOptions
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
initialInterval
- The initial interval.multiplier
- The multiplier.maxInterval
- The max interval.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder retryPolicy(RetryPolicy policy)
RetryInterceptorBuilder
retryPolicy
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
policy
- The policy.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder backOffPolicy(BackOffPolicy policy)
RetryInterceptorBuilder
backOffPolicy
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
policy
- The policy.public RetryInterceptorBuilder.StatefulRetryInterceptorBuilder recoverer(MethodInvocationRecoverer<?> recoverer)
RetryInterceptorBuilder
MethodInvocationRecoverer
for the Retry interceptor.recoverer
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
recoverer
- The recoverer.public StatefulRetryOperationsInterceptor build()
build
in class RetryInterceptorBuilder<StatefulRetryOperationsInterceptor>
Copyright © 2014 SpringSource. All rights reserved.