Class RetryInterceptor
java.lang.Object
io.github.resilience4j.micronaut.BaseInterceptor
io.github.resilience4j.micronaut.retry.RetryInterceptor
- All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,,Object> io.micronaut.aop.MethodInterceptor<Object,,Object> io.micronaut.core.order.Ordered
@InterceptorBean(Retry.class)
@Requires(beans=io.github.resilience4j.retry.RetryRegistry.class)
public class RetryInterceptor
extends BaseInterceptor
implements io.micronaut.aop.MethodInterceptor<Object,Object>
-
Field Summary
Fields inherited from interface io.micronaut.aop.Interceptor
ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGETFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionRetryInterceptor(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, io.github.resilience4j.retry.RetryRegistry retryRegistry, ExecutorService executorService, PublisherExtension extension, io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionfindFallbackMethod(io.micronaut.aop.MethodInvocationContext<Object, Object> context) Finds a fallback method for the given context.intgetOrder()Methods inherited from class io.github.resilience4j.micronaut.BaseInterceptor
fallback, fallbackForFutureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.aop.MethodInterceptor
intercept
-
Constructor Details
-
RetryInterceptor
public RetryInterceptor(io.micronaut.context.ExecutionHandleLocator executionHandleLocator, io.github.resilience4j.retry.RetryRegistry retryRegistry, @Named("scheduled") ExecutorService executorService, PublisherExtension extension, io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceio.micronaut.core.order.Ordered
-
findFallbackMethod
public Optional<? extends io.micronaut.inject.MethodExecutionHandle<?,Object>> findFallbackMethod(io.micronaut.aop.MethodInvocationContext<Object, Object> context) Finds a fallback method for the given context.- Specified by:
findFallbackMethodin classBaseInterceptor- Parameters:
context- The context- Returns:
- The fallback method if it is present
-
intercept
-