Interface Repeat<C extends FlowContext>

    • Field Detail

      • DEFAULT_FAIL_FAST

        static final boolean DEFAULT_FAIL_FAST
        By default, the execution of task fails fast.
        See Also:
        Constant Field Values
      • DEFAULT_INTERVAL

        static final long DEFAULT_INTERVAL
        By default, the interval between the iterations is 1 second.
        See Also:
        Constant Field Values
      • DEFAULT_TIMEOUT

        static final long DEFAULT_TIMEOUT
        By default, the timeout for the loop is 10 seconds.
        See Also:
        Constant Field Values
      • DEFAULT_ITERATIONS

        static final int DEFAULT_ITERATIONS
        By default, the number of iterations are infinite.
        See Also:
        Constant Field Values
    • Method Detail

      • while_

        Repeat<C> while_​(Predicate<C> predicate)
        The task is executed as long as the given predicate evaluates to true. Defaults to a precondition which always returns true.
      • failFast

        Repeat<C> failFast​(boolean failFast)
        Whether the execution of the task should fail fast or fail last. Defaults to true.
      • interval

        Repeat<C> interval​(long interval)
        The interval in milliseconds between the iterations. Defaults to 1000L milliseconds.
      • timeout

        Repeat<C> timeout​(long timeout)
        The timeout in milliseconds for the while loop. Defaults to 10000L milliseconds.
      • iterations

        Repeat<C> iterations​(int iterations)
        The maximal number of iterations of the loop. Defaults to an infinite loop (-1).