@ SafeVarargs public static RetryBuilder anyOf ( Class < ? extends Throwable > ... types ) { RetryBuilder retryBuilder = new RetryBuilder ( ) ; retryBuilder . maxAttempts = 1 ; retryBuilder . errorsStoppingRetry = Arrays . asList ( types ) ; retryBuilder . inverse = true ; return retryBuilder ; }
Only errors that are instanceOf the specified types will trigger a retry