Class: Synchronizer

synchronizer~Synchronizer

Downloads filter subscriptions whenever necessary.

Members

_downloader :module:downloader.Downloader

The object providing actual downloading functionality.

Type:
Source:

(private) _started

Whether the downloading of subscriptions has been started.

Source:

Methods

_getDownloadable(subscription, manual) → {module:downloader.Downloadable}

Creates a Downloadable instance for a subscription.

Parameters:
Name Type Description
subscription module:subscriptionClasses.Subscription
manual boolean
Source:
Returns:
Type
module:downloader.Downloadable

(generator) _getDownloadables() → {module:downloader.Downloadable}

Yields Downloadable instances for all subscriptions that can be downloaded.

Source:
Yields:
Type
module:downloader.Downloadable

execute(subscription, manual)

Starts the download of a subscription.

Parameters:
Name Type Description
subscription module:subscriptionClasses.DownloadableSubscription

Subscription to be downloaded

manual boolean

true for a manually started download (should not trigger fallback requests)

Source:

isExecuting(url) → {boolean}

Checks whether a subscription is currently being downloaded.

Parameters:
Name Type Description
url string

URL of the subscription

Source:
Returns:
Type
boolean

start()

Starts downloading subscriptions.

No subscriptions are downloaded until this function has been called at least once.

Source:

stop()

Clear any further downloader scheduled check and set its internal state as not started.

Source: