A Scala code has a retry mechanism which is based on currying function:
object RetryUtil {
def retry[T](retry: Int, timeout: FiniteDuration)(exc: => T): T = {
//
}
}
I want to call this code from Java (8), which use generics:
public class SuperService {
public <T> T call(Data<T> data) {
// I want to call internalCall from here, with the Scala retry mechanism from before.
}
private <T> T internalCall(DataWithResult<T> data) {
}
}
How should it be done?
Thanks.