Interface FailedAttempt

  • All Superinterfaces:
    Attempt

    public interface FailedAttempt
    extends Attempt
    Failed attempt.
    • Method Detail

      • routing

        RetryRoutingPolicy routing()
        Returns the routing policy.
        Returns:
        Routing policy.
      • error

        Throwable error()
        Returns the cause of ths failure.
        Returns:
        Cause of this failure.
      • isCausedBy

        default boolean isCausedBy​(Class<? extends Throwable> type)
        Returns true if this failure is caused by an error of the specified type.
        Parameters:
        type - Error type.
        Returns:
        true if this failure is caused by an error of the specified type.
      • isCausedBy

        default <T extends Throwable> boolean isCausedBy​(Class<T> type,
                                                         Predicate<T> predicate)
        Returns true if this failure is caused by an error of the specified type.
        Type Parameters:
        T - Error type.
        Parameters:
        type - Error type.
        predicate - Error predicate.
        Returns:
        true if this failure is caused by an error of the specified type.