Resilience4j-circuitbreaker allows us to wrap a service using decorator functions, but from what I can tell it only allows functional interfaces such as Supplier, Consumer, and Function which accept at most 1 input.
If I have a service which has a method which accepts 2 arguments, how would i be able to wrap it with the circuitbreaker?
In https://www.baeldung.com/resilience4j:
interface RemoteService {
int process(int i);
}
CircuitBreakerRegistry registry = CircuitBreakerRegistry.of(config);
CircuitBreaker circuitBreaker = registry.circuitBreaker("my");
Function<Integer, Integer> decorated = CircuitBreaker
.decorateFunction(circuitBreaker, service::process);
If process(int i) was something like process(int i, String s), which decorator Function would be able to be used for this purpose?