Class RepeatContext


  • public class RepeatContext
    extends Object
    API for configuring and executing a RepeatCallback with a RepeatTemplate
    • Constructor Detail

      • RepeatContext

        public RepeatContext()
    • Method Detail

      • times

        public RepeatContext times​(int times)
        set the number of times to execute the RepeatCallback.
        Parameters:
        times - the number of times to execute the RepeatCallback
        Returns:
        this
      • repeat

        public <T,​E extends ThrowableList<T> repeat​(RepeatCallback<T,​E> repeatCallback)
                                                     throws E extends Throwable
        execute the RepeatCallback using a RepeatTemplate
        Type Parameters:
        T - the return type of the RepeatCallback
        E - exceptions
        Parameters:
        repeatCallback - the RepeatCallback to execute.
        Returns:
        a List of results from each RepeatCallback
        Throws:
        E - if RepeatCallback fails
        E extends Throwable