Arrays.asList(retryAnnotation.exceptionsToRetry())).withExceptionsToExclude(
Arrays.asList(retryAnnotation.excludeExceptions())).withBackoffCoefficient(retryAnnotation.backoffCoefficient()).withMaximumRetryIntervalSeconds(
retryAnnotation.maximumRetryIntervalSeconds()).withRetryExpirationIntervalSeconds(
retryAnnotation.retryExpirationSeconds()).withMaximumAttempts(retryAnnotation.maximumAttempts());
retryPolicy.validate();
return retryPolicy;
}
}