@Singleton public class DefaultRetryInterceptor extends Object implements MethodInterceptor<Object,Object>
MethodInterceptor
that retries an operation according to the specified
Retryable
annotation.HOTSWAP, LAZY, PROXY_TARGET
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher)
Deprecated.
|
DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher,
ExecutorService executorService)
Construct a default retry method interceptor with the event publisher.
|
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
Object |
intercept(MethodInvocationContext<Object,Object> context)
Extended version of the
MethodInterceptor.intercept(InvocationContext) method that accepts a MethodInvocationContext . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
intercept
@Deprecated public DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher)
DefaultRetryInterceptor(ApplicationEventPublisher, ExecutorService)
insteadeventPublisher
- The event publisher to publish retry events@Inject public DefaultRetryInterceptor(ApplicationEventPublisher eventPublisher, @Named(value="scheduled") ExecutorService executorService)
eventPublisher
- The event publisher to publish retry eventsexecutorService
- The executor service to use for completable futurespublic int getOrder()
public Object intercept(MethodInvocationContext<Object,Object> context)
MethodInterceptor
MethodInterceptor.intercept(InvocationContext)
method that accepts a MethodInvocationContext
.intercept
in interface MethodInterceptor<Object,Object>
context
- The context