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 finished. 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.Interval 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 repeat schedule which determines the maximum number of invocations and the interval between subsequent invocations. See Schedule for more details.
- 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
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any