Interface MethodRetryPredicate

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MethodRetryPredicate
Predicate for retrying a Throwable from a specific Method.
Since:
7.0
Author:
Juergen Hoeller
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    forMethod(Method method)
    Build a Predicate for testing exceptions from a given method.
    boolean
    shouldRetry(Method method, Throwable throwable)
    Determine whether the given Method should be retried after throwing the given Throwable.
  • Method Details

    • shouldRetry

      boolean shouldRetry(Method method, Throwable throwable)
      Determine whether the given Method should be retried after throwing the given Throwable.
      Parameters:
      method - the method to potentially retry
      throwable - the exception encountered
    • forMethod

      default Predicate<Throwable> forMethod(Method method)
      Build a Predicate for testing exceptions from a given method.
      Parameters:
      method - the method to build a predicate for