Interface RetryableQuestion<A>

    • Method Detail

      • getIgnoredExceptions

        default java.util.Set<java.lang.Class<? extends java.lang.Exception>> getIgnoredExceptions()
        Returns:
        the Set of Exception classes that will be ignored when thrown in a retry
      • acceptable

        default boolean acceptable​(A answer)
        This determines if a given answer is acceptable. In that case the retrying will be stopped and the answer is returned.

        By default this will accept

        • a Optional.isPresent(),
        • a !Collection.isEmpty(),
        • a !Map.isEmpty(),
        • an array with length > 0, and
        • a Boolean.TRUE.
        Parameters:
        answer - an answer
        Returns:
        true if the given answer is acceptable