Class: FilterListener

filterListener~FilterListener

filterListener implementation.

Members

(private, nullable) _engine :module:filterEngine~FilterEngine

A reference to the filter engine.

Type:
Source:

(private) _isDirty :number

Increases on filter changes, filters will be saved if it exceeds 1.

Type:
  • number
Source:

Methods

(private) _setDirty(factor)

Increases "dirty factor" of the filters and calls filterStorage.saveToDisk() if it becomes 1 or more.

Save is executed delayed to prevent multiple subsequent calls. If the parameter is 0 it forces saving filters if any changes were recorded after the previous save.

Parameters:
Name Type Description
factor number
Source:

(async, package) initialize(engine) → {Promise}

Initializes filter listener.

Parameters:
Name Type Description
engine module:filterEngine~FilterEngine

A reference to the filter engine.

Source:
Returns:

A promise that is fulfilled when the initialization is complete.

Type
Promise