Class: Scheduler

Scheduler(schedulerSymbol)

Generic scheduler class that can emit events of type T. The purpose of this scheduler is to notify when an event occurs or something should be executed. It shall be used as base-class to other schedulers. It is not to be used for executing jobs, use an appropriate queue for that. Although providing Observables, Schedulers never error or complete.

Constructor

new Scheduler(schedulerSymbol)

Parameters:
Name Type Description
schedulerSymbol Symbol The symbol that is used for emitting events from this Scheduler.
Author:
Source:

Members

observable :Observable.<(T|ScheduleEvent)>

Returns the same Observable to every subscriber. Note that this Observable never errors or drains. You will need to observe a particular Schedule to get its errors or completion. The Observable never errors or completes.
Type:
Source:

Methods

addSchedule(schedule) → {this}

Add a Schedule to this scheduler. This is an abstract method.
Parameters:
Name Type Description
schedule Schedule
Source:
Returns:
Type
this

getObservableForSchedule(schedule) → {Observable.<(T|ScheduleEvent)>}

Parameters:
Name Type Description
schedule T | Schedule
Source:
Returns:
An Observable for the designated schedule.
Type
Observable.<(T|ScheduleEvent)>

hasSchedule(schedule) → {this}

Returns a value indicating whether this Scheduler has the given Schedule. This is an abstract method.
Parameters:
Name Type Description
schedule Schedule
Source:
Returns:
Type
this

(generator) preliminaryEvents(afteropt, beforeopt) → {IterableIterator.<PreliminaryScheduleEvent.<(T|Schedule), any>>}

A generator that supposedly yields all schedules' preliminary events.
Parameters:
Name Type Attributes Description
after Date <optional>
Optional. Defaults to undefined.
before Date <optional>
Optional. Defaults to undefined.
Source:
Returns:
Type
IterableIterator.<PreliminaryScheduleEvent.<(T|Schedule), any>>

removeAllSchedules() → {Array.<Schedule>}

Removes all Schedules from this scheduler. This is an abstract methdod.
Source:
Returns:
All Schedules as array.
Type
Array.<Schedule>

removeSchedule(schedule) → {this}

Remove a Schedule from this scheduler. This is an abstract method.
Parameters:
Name Type Description
schedule Schedule
Source:
Returns:
Type
this