ScheduledConfig

ox.scheduling.ScheduledConfig
case class ScheduledConfig[E, T](schedule: Schedule, afterAttempt: (Int, Either[E, T]) => ScheduleStop, 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

afterAttempt

A callback invoked after every attempt, with the current invocation number (starting from 1) and the result of the operation. Might decide to short-circuit further attempts, and stop the schedule. Schedule configuration (e.g. max number of attempts) takes precedence.

schedule

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

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

Concrete methods

def afterAttempt(newAfterAttempt: (Int, Either[E, T]) => ScheduleStop): ScheduledConfig[E, T]
def schedule(newSchedule: Schedule): ScheduledConfig[E, T]
def sleepMode(newSleepMode: SleepMode): ScheduledConfig[E, T]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product