@Singleton
public class DefaultRetryInterceptor
extends java.lang.Object
implements io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>
MethodInterceptor that retries an operation according to the specified
Retryable annotation.| Constructor and Description |
|---|
DefaultRetryInterceptor(io.micronaut.context.event.ApplicationEventPublisher eventPublisher,
java.util.concurrent.ExecutorService executorService)
Construct a default retry method interceptor with the event publisher.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
java.lang.Object |
intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context) |
public DefaultRetryInterceptor(io.micronaut.context.event.ApplicationEventPublisher eventPublisher,
@Named(value="scheduled")
java.util.concurrent.ExecutorService executorService)
eventPublisher - The event publisher to publish retry eventsexecutorService - The executor service to use for completable futurespublic int getOrder()
getOrder in interface io.micronaut.core.order.Ordered@Nullable public java.lang.Object intercept(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
intercept in interface io.micronaut.aop.MethodInterceptor<java.lang.Object,java.lang.Object>