All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.resilience4j.micronaut.util.PublisherExtension Maven / Gradle / Ivy

Go to download

Resilience4j is a lightweight, easy-to-use fault tolerance library designed for Java8 and functional programming

There is a newer version: 2.2.0
Show newest version
package io.github.resilience4j.micronaut.util;

import io.github.resilience4j.bulkhead.Bulkhead;
import io.github.resilience4j.circuitbreaker.CircuitBreaker;
import io.github.resilience4j.ratelimiter.RateLimiter;
import io.github.resilience4j.retry.Retry;
import io.github.resilience4j.timelimiter.TimeLimiter;
import io.micronaut.aop.MethodInvocationContext;
import io.micronaut.inject.MethodExecutionHandle;
import org.reactivestreams.Publisher;

import java.util.Optional;
import java.util.function.Function;

public interface PublisherExtension {
     Publisher bulkhead(Publisher publisher, Bulkhead handler);

     Publisher circuitBreaker(Publisher publisher, CircuitBreaker handler);

     Publisher timeLimiter(Publisher publisher, TimeLimiter handler);

     Publisher retry(Publisher publisher, Retry handler);

     Publisher rateLimiter(Publisher publisher, RateLimiter handler);

     Publisher fallbackPublisher(Publisher publisher, MethodInvocationContext context,  Function, Optional>> handler);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy