ScheduledConfig

ox.scheduling.ScheduledConfig
case class ScheduledConfig[E, T](schedule: Schedule, onOperationResult: (Int, Either[E, T]) => Unit, shouldContinueOnError: E => Boolean, shouldContinueOnResult: T => Boolean, sleepMode: SleepMode)

A config that defines how to schedule an operation.

Type parameters

E

The error type of the operation. For operations returning a T or a Try[T], this is fixed to Throwable. For operations returning an Either[E, T], this can be any E.

T

The successful result type for the operation.

Value parameters

onOperationResult

A function that is invoked after each invocation. The callback receives the number of the current invocations number (starting from 1) and the result of the operation. The result is either a successful value or an error.

schedule

The schedule which determines the maximum number of invocations and the duration between subsequent invocations. See Schedule for more details.

shouldContinueOnError

A function that determines whether to continue the loop after an error. The function receives the error that was emitted by the last invocation. Defaults to => false.

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.

sleepMode

The mode that specifies how to interpret the duration provided by the schedule. See SleepMode for more details.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product