I wanted to create two retry methods. Where in second retry method is async method. It should be hit only after successful completion of first method.
@Retryable(value = { LockedException.class }, maxAttempts = 3, backoff = @Backoff(delay = 1000))
Public String firstMethod() {
return "first";
}
@Async
@Retryable(value = { LockedException.class }, maxAttempts = 3, backoff = @Backoff(delay = 1000))
public String secondMethod() {
return "second";
}
How would I do this?