RepeatConfig
A config that defines how to repeat an operation.
Schedule provides the interval between subsequent invocations, which guarantees that the next operation will start no sooner than the specified duration after the previous operations has started. If the previous operation takes longer than the interval, the next operation will start immediately after the previous one has finished.
It is a special case of ScheduledConfig with ScheduledConfig.sleepMode always set to SleepMode.StartToStart and a ScheduledConfig.afterAttempt callback which checks if the result was successful.
Type parameters
- E
-
The error type of the operation. For operations returning a
T
or aTry[T]
, this is fixed toThrowable
. For operations returning anEither[E, T]
, this can be anyE
. - T
-
The successful result type for the operation.
Value parameters
- schedule
-
The schedule which determines the intervals between invocations and number of attempts to execute the operation.
- shouldContinueOnResult
-
A function that determines whether to continue the loop after a success. The function receives the value that was emitted by the last invocation. Defaults to => true.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any