com.github.twitch4j.extensions.compat.HystrixCommandConverter Maven / Gradle / Ivy
The newest version!
package com.github.twitch4j.extensions.compat;
import com.netflix.hystrix.HystrixCommand;
import lombok.NonNull;
import java.util.function.Function;
class HystrixCommandConverter extends HystrixCommand {
private final HystrixCommand command;
private final Function converter;
public HystrixCommandConverter(@NonNull HystrixCommand hystrixCommand, @NonNull Function converter) {
super(hystrixCommand.getCommandGroup());
this.command = hystrixCommand;
this.converter = converter;
}
@Override
protected U run() {
return converter.apply(command.execute());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy